Last active
November 4, 2022 09:40
-
-
Save barograf/aebc4288f49d29f7ec8d017f1fe36a76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source_df = source_dynf.toDF() | |
partitioned_df = source_df.withColumn( | |
"year", functions.year(functions.col("created_at")) | |
).withColumn("month", functions.month(functions.col("created_at"))) | |
partitioned_dynf = DynamicFrame.fromDF( | |
partitioned_df, glueContext, f"partitioned_dynf_{tbl_name}" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment