-
Notifications
You must be signed in to change notification settings - Fork 97
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: set work_group in dbt_project.yml #377
Comments
@SoumayaMauthoorMOJ did you try this
I didn't test this - therefore I'm not sure that it works - but I expect that it should pick the workgroup per folders in your models. |
Thanks @nicor88 for getting back to me! I should have said that I already tried modifying
If I do a If I then run
|
@SoumayaMauthoorMOJ Thanks for checking that. I believe that the issue is due to this: https://github.com/dbt-athena/dbt-athena/blob/main/dbt/adapters/athena/connections.py#L46 the workgroup is pick for run - as the connection is created once - Not really sure that we can do this. |
Thanks @nicor88 this is more of a nice to have so I'll park this thread for now but might come back to it when I have more time |
As a possible workaround @SoumayaMauthoorMOJ you can consider to run your curation models separately - overwrite the workgroup with env variable - same for your derived models (using a env variable to override the profile workgroup) I've a setup where I run silver models independently from gold models - different names but similar meaning to what you describe as curation and derivation, and in my setup I could achieve this quite easily. |
Yes that's the approach I'm going with for now. It would be nice to run the silver and gold models in one |
@SoumayaMauthoorMOJ indeed your right - it will be nice to overwrite that parameter per group of models |
Hey @nicor88 we've decided to try using a single
The AthenaCursor Hence I "think" it should be possible to change the workgroup, as long as I can pass in model Any ideas? Perhaps something similar to which is then used in the materializations see: https://github.com/dbt-athena/dbt-athena/blob/6ef6c970134abbbf52afb58110545825fde3a36d/dbt/include/athena/macros/materializations/models/table/create_table_as.sql#L150 |
good findings - sure consider to propose a PR with your changes, I believe that it make sense. If you use configs means that the workgroup can be set like that in dbt_project exactly as you proposed here #377 (comment) |
I have raised issue with dbt-core to pass model configuration to execute(): dbt-labs/dbt-adapters#226 |
@svdimchenko there is still some work to do here. Unfortunately we cannot still full pass workgroup to specifi model. I'm re-opening now ;) |
Ahhh, yes. I believe it was closed automatically🚆 |
@nicor88 @svdimchenko I want to propose closing this ticket until dbt-labs/dbt-adapters#226 is completed. Modifying the various materizaliations to pass in |
Sure, happy to close it and then re-consider to open again if necessary. |
Would it be possible to set
work_group
indbt_project.yml
? This means we could assign different queries to different workgroups within a singledbt run
, for example to separate the curation queries vs the derivation queries. I would be happy to do the work if someone could point me in the right direction. I'm guessing I would need to modify https://github.com/dbt-athena/dbt-athena/blob/main/dbt/adapters/athena/impl.py?The text was updated successfully, but these errors were encountered: