DLT- apply_changes() SCD2 - Rename_columns : __START_AT & __END_AT

VenkateswarluAd
New Contributor

 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.

szymon_dybczak
Esteemed Contributor III

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.

Ravivarma
Databricks Employee
Databricks Employee

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