1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi ,
please note that , as by the documentation page you linked, what you are experiencing is the default behaviuor:
You can also set the updateBehavior
value to LOG
if you want to prevent your table schema from being overwritten, but still want to add the new partitions. The default value of updateBehavior
is UPDATE_IN_DATABASE
, so if you don’t explicitly define it, then the table schema will be overwritten.
The code should look like:
additionalOptions = {
"enableUpdateCatalog": True,
"updateBehavior": "LOG"}
additionalOptions["partitionKeys"] = ["partition_key0", "partition_key1"]
sink = glueContext.write_dynamic_frame_from_catalog(frame=last_transform, database=<dst_db_name>,
table_name=<dst_tbl_name>, transformation_ctx="write_sink",
additional_options=additionalOptions)
job.commit()
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 3년 전
Hi,
Thanks for your answer, but I tried with "updateBehavior": "LOG", and the table description and column comments were updated.
thank you for the feed back I will research it a bit more