1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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
beantwortet vor einem Jahr
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 6 Monaten