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

support archival (and incremental models?) on BigQuery #712

Closed
drewbanin opened this issue Mar 29, 2018 · 4 comments
Closed

support archival (and incremental models?) on BigQuery #712

drewbanin opened this issue Mar 29, 2018 · 4 comments
Assignees
Labels
bigquery enhancement New feature or request snapshots Issues related to dbt's snapshot functionality

Comments

@drewbanin
Copy link
Contributor

This is possible with the recent improvements to BigQuery's DML interface

@drewbanin drewbanin added the enhancement New feature or request label Mar 29, 2018
@drewbanin drewbanin added this to the Adapter Parity milestone Mar 29, 2018
drewbanin added a commit that referenced this issue Apr 2, 2018
drewbanin added a commit that referenced this issue Apr 6, 2018
@drewbanin drewbanin reopened this Apr 6, 2018
@drewbanin
Copy link
Contributor Author

TODO : Confirm that this works, then close

@cmcarthur cmcarthur modified the milestones: Adapter Parity, 0.10.2 Apr 26, 2018
@drewbanin drewbanin self-assigned this Jul 6, 2018
@drewbanin drewbanin added the snapshots Issues related to dbt's snapshot functionality label Jul 11, 2018
drewbanin added a commit that referenced this issue Jul 12, 2018
Closes #712: support archival (and incremental models?) on BigQuery
@lewish
Copy link
Contributor

lewish commented Jul 26, 2018

Great work on the merge statements! Just doing some testing with these, and ran into a couple of small issues:

The stripped whitespace in Jinja when not using unique_key causes some syntax errors, ends up generating some SQL like as SOURCEon FALSE

BigQuery currently throws an internal exception when using ON FALSE on conjunction with WHEN MATCHED then.

I filed a bug but probably make sense to only put the WHEN MATCHED clause in if the unique_key is specified.

An example of the fixes I made here: lewish@393d6fc#diff-b09ed71a27c521a23e10d94e0fa8195d

@cmcarthur
Copy link
Member

@lewish this is great. can you send a PR with those changes? the only thing i'm unsure about is only including WHEN MATCHED when unique key is specified -- I'll discuss w @drewbanin later today

@drewbanin
Copy link
Contributor Author

great catches - thanks for the heads up, @lewish!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery enhancement New feature or request snapshots Issues related to dbt's snapshot functionality
Projects
None yet
Development

No branches or pull requests

3 participants