What are the reasons to consolidate all the functions for different dbt commands in a single Python file ? #9536
tahseenadit
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I was looking into this file https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/cli/main.py and was wondering what was the thinking behind writing all the functions for different dbt commands in a single python file because each of these functions use multiple decorators.
Here is why I am asking this question:
Imagine someone developed a custom decorator that generates an error like below:
Now someone at some point adds another custom command in main.py file that uses the above decorator like below:
Then when main.py is executed, it fails.
I am not sure if there will ever be a need to execute main.py separately but I am just exploring here. Would like to know the thinking behind the current implementation design. Can you share anything regarding that ?
Beta Was this translation helpful? Give feedback.
All reactions