The renaming of the snapshot meta columns does not work.
I wanted to create an scd-type2 like table.
I am failing on two levels:
- the valid to date is still NULL even if I configured it to be 2999-12-31
- the meta columns still use the names dbt_valid_from etc.
Here is my schema.yml:
snapshot/schema.yml:
snapshots:
- name: psa_nwd_employees_ss
relation: ref('stg_nwd_employees_20_cln')
config:
enabled: true
unique_key: EmployeeID
strategy: check
check_cols:
- hash_value
dbt_valid_to_current: "CONVERT(date, '2999-12-31')"
hard_deletes: new_record
snapshot_meta_column_names:
dbt_valid_from: dss_start_date
dbt_valid_to: dss_end_date
dbt_scd_id: dss_version_id
dbt_updated_at: dss_update_date
dbt_is_deleted: psa_delete_flag
Any idea, what I didn’t do correctly?