DLT- apply_changes() SCD2 - Rename_columns : __START_AT & __END_AT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 10:21 AM
Renaming the column names of the __START_AT and __END_AT columns created when using the dlt.apply_changes() method for performing SCD2 type updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 10:43 AM
Hi @VenkateswarluAd ,
I don't think it is possible to change those names. They are used internally by dlt framework and if you change them something definitely gonna break.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 11:16 AM
Hello @VenkateswarluAd ,
Greetings of the day!
The columns __START_AT and __END_AT are used to track the validity period of each record for SCD Type 2 updates. Please be aware that renaming these columns could disrupt the functionality of the SCD Type 2 updates.
You can read more about this here: https://docs.databricks.com/en/delta-live-tables/cdc.html#how-is-cdc-implemented-with-the-apply-chan...
Regards,
Ravi