DLT Apply Changes
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 07:05 AM
Hi,
In DLT, how do we specify which columns we don't want to overwrite when using the “apply changes” operation in the DLT (in the attached example, we want to avoid overwriting the “created_time” column)?
I am using this sample code
dlt.apply_changes(
source= f"{table_name}_cdc",
target= table_name,
keys = table_keys,
sequence_by = F.col('_fivetran_synced'),
except_column_list = ['created_time'],
stored_as_scd_type = 1,
apply_as_deletes=F.expr("_fivetran_deleted= true"),
track_history_column_list = None,
track_history_except_column_list = None
)
But instead, except_column_list drops this column from the target table.
But instead, except_column_list drops this column from the target table.