Postgresql 在';dbt快照';
下面是我的Snapshot.sql代码Postgresql 在';dbt快照';,postgresql,snapshot,dbt,Postgresql,Snapshot,Dbt,下面是我的Snapshot.sql代码 {% snapshot ArtisanNonMCompletion_snap %} {{ config( target_database='idwork', target_schema='reporting_views', strategy='check', unique_key='"surrogateKey"', check_cols=[
{% snapshot ArtisanNonMCompletion_snap %}
{{
config(
target_database='idwork',
target_schema='reporting_views',
strategy='check',
unique_key='"surrogateKey"',
check_cols=["id", "Section", "sectionCompletion"],
)
}}
select * from {{ source('reporting_views', 'ArtisanNonMandatoryCompletion') }}
{% endsnapshot %}
当我运行初始dbt快照时,它工作正常。此后,它会产生一个错误
Postgres error: column snapshotted_data.artisanid does not exist
HINT: Perhaps you meant to reference the column "snapshotted_data.ArtisanId".
快照的_数据是dbt产生的,所以我不确定如何引用它。我尝试切换引用的源,但仍然产生相同的错误。我还尝试为check_cols字段创建一个代理项,但仍然没有成功。不确定我做错了什么