1 回答
- 最新
- 投票最多
- 评论最多
0
I have figured out the solution. "withColumn' is not a part of DynamicFrame. I had to convert the Dynamic Frame into Data Frame and then use 'withColumn' attribute to implement the regex function like below: from pyspark.sql.types import * from pyspark.sql.functions import regexp_replace from awsglue.dynamicframe import DynamicFrame data_frames = full_order_node.toDF() ##converting to DataFrame data_frames = data_frames.withColumn("featured",regexp_replace(col("featured")," ", "")) final_output = DynamicFrame.fromDF(data_frames, glueContext, "final_output") ##converting back to DynamicFrame
已回答 1 年前
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前