Skip to content

Instantly share code, notes, and snippets.

@sharkyak
Created February 4, 2022 12:53
Show Gist options
  • Save sharkyak/39f8b41f133f4d1e76d76a3e3f064dee to your computer and use it in GitHub Desktop.
Save sharkyak/39f8b41f133f4d1e76d76a3e3f064dee to your computer and use it in GitHub Desktop.
from awsglue.dynamicframe import DynamicFrame
from pyspark.sql.functions import to_timestamp, col
dataFrame = datasource0.toDF().withColumn("created_at", to_timestamp(col("created_at"),"yyyy-mm-dd HH:mm:ss"))
editedData = DynamicFrame.fromDF(dataFrame, glueContext, "editedData")
applymapping1 = ApplyMapping.apply(frame = editedData, mappings =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment