The problem I’m having
dbt snapshot fails on subsequent runs as a result of an ambiguous column error in the source code
FYI This is using dbt-databricks. My snapshot block looks like this:
{% snapshot raw_reviews_snapshot %}
{{
config(
target_schema='airbnb_poc',
strategy='check',
unique_key = 'ID',
check_cols=['listing_id', 'date', 'comments', 'reviewer_name', 'reviewer_id']
)
}}
SELECT
ID,
listing_id,
date,
reviewer_id,
reviewer_name,
comments
FROM {{ source('airbnb_source','raw_reviews') }}
WHERE ID IS NOT NULL
{% endsnapshot %}