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

Submaterializations #7135

Closed
wants to merge 1 commit into from
Closed

Conversation

acurtis-evi
Copy link

@acurtis-evi acurtis-evi commented Mar 8, 2023

resolves #7122

Description

In my company, we have a need to run operations on our materialized tables such as user deletion requests. The dbt run-operation is single threaded and doesn't take advantage of the node yml structure. Other submaterializations might be things like 'clone' which just implements snowflake's clone feature.

I was thinking that an improvement would be to (for a particular model)

materialized: incremental
submaterializations:
  - user_delete
  - clone

Another model might be

materialized: table
submaterializations:
  - user_delete

Materializations named incremental_user_delete and table_user_delete could be created to match above

And it could be run using

dbt run --submaterialization user_delete ...

or

dbt ls --submaterialization user_delete ...

(also compile, parse)

Any model which has the submaterialization would respond to the above run and it would use the dag order / threads to run the operation.

https://getdbt.slack.com/archives/C50NEBJGG/p1677938569851409

Also supports --select submaterialization: syntax.

Checklist

@acurtis-evi acurtis-evi requested a review from a team March 8, 2023 00:10
@acurtis-evi acurtis-evi requested a review from a team as a code owner March 8, 2023 00:10
@cla-bot cla-bot bot added the cla:yes label Mar 8, 2023
@acurtis-evi acurtis-evi mentioned this pull request Mar 8, 2023
6 tasks
@jtcohen6 jtcohen6 added the Refinement Maintainer input needed label Mar 22, 2023
Copy link
Contributor

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

@github-actions github-actions bot added the stale Issues that have gone stale label Nov 21, 2023
Copy link
Contributor

Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Refinement Maintainer input needed stale Issues that have gone stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-2270] [Feature] Submaterializations
2 participants