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

[Feature] Do several actions on a table #11010

Closed
3 tasks done
Simon-Free opened this issue Nov 18, 2024 · 1 comment
Closed
3 tasks done

[Feature] Do several actions on a table #11010

Simon-Free opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core

Comments

@Simon-Free
Copy link

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 functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I need (i think) to have 2 models inserting in the same table, is there any way currently to implement this ? Here is a simple example detailing why.

I have my_table that has 3 columns, A, B and C. A is my primary_key.

Given my_source, that contains 2 columns A and B, I want to upsert in my_table new lines, leaving for now C null.

From another_source, that contains B, C, D, and my_table I want to deduce my_final_table, which is e.g.

select B, sum(C), sum(D) from another_source group by B

Then, this is a long operation, i want to avoid doing it twice.

Finally, I want to update my_table values using something like

select B, 1 if sum(C) > 100 else 0 from my_final_table join my_table using B

The simplest way I see to do this would be to write 2 scripts that are doing operations on the same table, but is it feasible using dbt ?

Thank you for the answer :)

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@Simon-Free Simon-Free added enhancement New feature or request triage labels Nov 18, 2024
@dbeatty10
Copy link
Contributor

Hi @Simon-Free Could you please ask this question in dbt Discourse here or the #advice-dbt-help Slack channel here?

We focus on bug reports and features requests in GitHub and use Discourse and Slack for product questions. So I'm going to close this as "not planned" since it is a product question.

I can provide some quick links before closing this issue though.

dbt has several features that may be relevant to your use-case:

Please ask this question in Discourse and Slack to hear what others suggest for your situation.

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
@dbeatty10 dbeatty10 added wontfix Not a bug or out of scope for dbt-core and removed triage labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core
Projects
None yet
Development

No branches or pull requests

2 participants