I have a snapshot that looks like this:
{% snapshot my_snapshot %}
{{
config(
target_schema='my_schema',
unique_key='TaskId',
strategy='timestamp',
updated_at='LastModified',
snapshot_meta_column_names={
"dbt_valid_from": "EffectiveStartDate",
"dbt_valid_to": "EffectiveEndDate"
}
)
}}
select *
from {{ ref('stg_tasks') }}
{% endsnapshot %}
It creates the table correctly the first time, with the EffectiveStartDate/EffectiveEndDate columns. But the second time I run this, I get this error.
Snapshot target is missing configured columns (missing "dbt_valid_from", "dbt_valid_to"). See https://docs.getdbt.com/docs/build/snapshots#snapshot-meta-fields for more information.
It looks like some column check is still looking for the original dbt_valid_from/dbt_valid_to columns rather than the override.
My requirements.txt:
dbt-core==1.9.*
dbt-sqlserver==1.9.*
I have a snapshot that looks like this:
{% snapshot my_snapshot %} {{ config( target_schema='my_schema', unique_key='TaskId', strategy='timestamp', updated_at='LastModified', snapshot_meta_column_names={ "dbt_valid_from": "EffectiveStartDate", "dbt_valid_to": "EffectiveEndDate" } ) }} select * from {{ ref('stg_tasks') }} {% endsnapshot %}It creates the table correctly the first time, with the EffectiveStartDate/EffectiveEndDate columns. But the second time I run this, I get this error.
It looks like some column check is still looking for the original dbt_valid_from/dbt_valid_to columns rather than the override.
My requirements.txt: