While writing the data to S3 using dynamic frame i want to use partitioning columns which are not in dynamic frame.
For example:
def write_date(outpath,year):
glue_context.write_dynamic_frame.from_options(
frame = projectedEvents,
connection_type = "s3",
connection_options = {"path": outpath, "partitionKeys": [year]},
format = "parquet")
Here year is a parameter which does not present in dynamic frame.
This code is failing with an error: 'partition column "2021" not found in schema'
How can I write data in S3 using my own partitions?
Basically I want to write in S3 path as "outpath/2021/<parquet_file>"