Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots which target different databases do not materialize correctly #536

Closed
cody-scott opened this issue Sep 4, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@cody-scott
Copy link
Collaborator

A snapshot with a config target_database that is different then the profile fails when run.

Temp snapshot view is created in the primary database, but the snapshot expects it in the secondary database, which fails with it being unable to find the temp view.

{% snapshot claims_snapshot %}

{{
   config(
       target_database='TestDB_Secondary',
       target_schema='dbo',
       unique_key='id',

       strategy='timestamp',
       updated_at='updated_at',
   )
}}

select * from {{source('mysource', 'claims')}}

{% endsnapshot %}

In this example mysource is in the primary database, but the snapshot is being created in the secondary TestDB_Secondary

@cody-scott cody-scott added the bug Something isn't working label Sep 4, 2024
@dbt-msft dbt-msft deleted a comment from GenaroSalomone Sep 4, 2024
@cody-scott
Copy link
Collaborator Author

#516 (reply in thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant