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

[Bug] Unhelpful exception occurs with yaml file in list format #10284

Closed
gshank opened this issue Jun 10, 2024 · 1 comment · Fixed by #10285
Closed

[Bug] Unhelpful exception occurs with yaml file in list format #10284

gshank opened this issue Jun 10, 2024 · 1 comment · Fixed by #10285
Assignees

Comments

@gshank
Copy link
Contributor

gshank commented Jun 10, 2024

Description

If dbt reads a yaml file in list format such as:

- name: my_name
- name: alt_name

then an exception occurs:

File "/.../core/dbt/parser/schemas.py", line 123, in yaml_from_file
for source in contents.get("sources", []):

The code in parser/schemas.py is expecting a dictionary and doesn't handle a list in a user-friendly way.

Acceptance Criteria

Instead of unfriendly exception, we issue a better error message.

@MichelleArk
Copy link
Contributor

I've definitely ran into this before and spent too long debugging. Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants