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

[ADAP-691] [Feature] add incremental strategy append #811

Closed
3 tasks done
leo-schick opened this issue Jul 10, 2023 · 5 comments
Closed
3 tasks done

[ADAP-691] [Feature] add incremental strategy append #811

leo-schick opened this issue Jul 10, 2023 · 5 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request Stale

Comments

@leo-schick
Copy link

leo-schick commented Jul 10, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-bigquery functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Other dbt adapters support the incremental stragey append but dbt-bigquery does not: Supported incremental strategies by adapter

I was wondering why this has not been implemented since it is quite useful when you want to create a log table holding snapshot data with a timestamp.
I found blog item Creating “Append” Materialization in dbt (data build tool) which discusses addinng append_only as a materialization option to dbt-bigquery on an older dbt version, so it must be possible to do that in big query.

Describe alternatives you've considered

I implemented this now with merge by using a column with current_timestamp() as key. That works not perfect:

  • when running full_refresh, the data gets lost
  • it is a total overhead creating unnecessary processing time

Who will this benefit?

People building historical data tables or people which use the incremental strategy append with another adapeter and now want to switch their dbt project over to big query.

Are you interested in contributing this feature?

No response

Anything else?

No response

@leo-schick leo-schick added enhancement New feature or request triage labels Jul 10, 2023
@github-actions github-actions bot changed the title [Feature] add incremental strategy append [ADAP-691] [Feature] add incremental strategy append Jul 10, 2023
@rloredo
Copy link

rloredo commented Sep 15, 2023

If you do merge without a unique key specification the behaviour should be append only.
This is in the documentation

Not specifying a unique_key will result in append-only behavior, which means dbt inserts all rows returned by the model's SQL into the preexisting target table without regard for whether the rows represent duplicates.

But I haven't tested it.

@leo-schick
Copy link
Author

@rloredo OK, nice to know. I think this should be implemented by default so that this works equal to the other db provider with incremental strategy append.

Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 25, 2024
Copy link
Contributor

github-actions bot commented Apr 1, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
@dbeatty10
Copy link
Contributor

Thanks for raising this @leo-schick !

I think this would be covered by the work in dbt-labs/dbt-core#9290. Namely, these two:

So I'm going to leave this closed as a duplicate of those ones.

@dbeatty10 dbeatty10 added duplicate This issue or pull request already exists and removed triage labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

3 participants