-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[CT-1343] [Regression] 1.3.0 breaks projects that colocate non-dbt-related Python code with sql model ("dbt only allow one model defined per python file") #6061
Comments
@tin-homa Sorry to hear that you run into this issue! We added Can you try to add the |
Hey @ChenyuLInx. Thanks for the fast response. I couldn't get it to work though. Am I doing something wrong?
None of them worked (same error) |
hi @tin-homa, I just tested this and placing the I tested another with |
@tin-homa I still couldn't reproduce the issue, with multi layer of folder and everything. I wonder could it be library mismatch? Can you try Also happy to hop on a huddle on dbt slack to take a look together, you can find me at |
I have |
I tested again and the dbtignore works for me now. Maybe I was doing stupid things yesterday or I just needed to restart my environment somehow. Sorry for all the fuzz and thanks a lot for the quick response. |
Very glad you were able to get this working! @lostmygithubaccount We still need to actually document |
Is this a regression in a recent version of dbt-core?
Current Behavior
We have been structuring our projects to have the models_path pointing to folders that contains both dbt code (in .sql files) and other python code used for extract-load the data, or run some light modelling. This simplifies our repo structure a lot and has been very convenience to work with (compared to the default approach of having a separate dbt folder).
However, since v1.3.0 we're failing to run any dbt model (sql) due to this error
We realize this is due to the new version starting looking into .py files to find models, and assuming all .py files are dbt-related.
Expected/Previous Behavior
While I look forward to using dbt Python model, I don't think this feature should inhibit the ability of having other type of Python files in the same folder.
I'd suggest to either
Steps To Reproduce
dbt run -s the_sql_model
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: