You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can't have the "mode" set as "append" if the "schema_mode" is set as "overwrite".
Will look into why.
Will add the error message later.
Have made all assets overwrite for now - but will look into adding schema mode as a decorator arg.
As some assets will need to be append rather than overwrite.
Code as is:
try:
wr.s3.to_deltalake(
df=obj,
path=table_path,
mode=write_option,
schema_mode="overwrite", # INCLUDE AS A DECORATOR ARG AT SOME POINT LIKE FOR MODE ABOVEs3_allow_unsafe_rename=True,
)
context.log.info(f"Data written to Delta Lake table at {table_path}")
except (DeltaLakeWriteError, Exception) ase:
raisee
Fix
Schema mode arg would go:
@asset(group_name="energy_assets",io_manager_key="DeltaLake",metadata={"mode": "overwrite"},**ARGHERE**ins={"entsog_gas_uk_data_bronze": AssetIn("entsog_gas_uk_data_bronze")},required_resource_keys={"slack"})@with_slack_notification("ENTSOG Gas UK data")defentsog_gas_uk_data_silver(
context: AssetExecutionContext, entsog_gas_uk_data_bronze
):
The text was updated successfully, but these errors were encountered:
Issue
You can't have the "mode" set as "append" if the "schema_mode" is set as "overwrite".
Will look into why.
Will add the error message later.
Have made all assets overwrite for now - but will look into adding schema mode as a decorator arg.
As some assets will need to be append rather than overwrite.
Code as is:
Fix
Schema mode arg would go:
The text was updated successfully, but these errors were encountered: