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

[CT-1501] Clarify Error Message for how many models are allowed in a Python file #6245

Closed
ernestoongaro opened this issue Nov 14, 2022 · 0 comments · Fixed by #6251
Closed
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! python_models

Comments

@ernestoongaro
Copy link

ernestoongaro commented Nov 14, 2022

Currrently, if you have less than or more than one python model in a file, a parsing error reads:

dbt only allow one model defined per python file

but that's not clearly capturing the case where you have less than one model per python file.

if self.num_model_def != 1:
raise ParsingException("dbt only allow one model defined per python file", node=node)

Suggest setting the error to:

dbt allows exactly one model defined per python file, found <x>

@github-actions github-actions bot changed the title Clarify Error Message for how many models are allowed in a Python file [CT-1501] Clarify Error Message for how many models are allowed in a Python file Nov 14, 2022
@jtcohen6 jtcohen6 added enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! python_models labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! python_models
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants