-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] dbt docs fails to load on browser with javascript TypeError #10966
Comments
Thanks for reaching out @rudo-ro ! The error message you shared looks like it might be coming from here (introduced in dbt-labs/dbt-docs#425). What was in the commit that you isolated it to? Was it a related to a new or modified data test column, by any chance? If you can provide that code that triggered it, that might help us replicate the issue. |
thanks @dbeatty10 yes the code included snippets such as:
I rebuilt the project without this commit and it's working. |
Ah, I see what you are saying @rudo-ro. This isn't the way I'd expect the select ['x_id', 'y_id']
from analytics_dev.dbt_dbeatty.name_here
where ['x_id', 'y_id'] is null Did you try something like this instead? models:
- name: name_here
columns:
- name: x_id
data_tests:
- not_null
- unique
- name: y_id
data_tests:
- not_null
- unique When I used the following example data, it worked the way I would expect:
select 1 as x_id, 2 as y_id union all
select 1 as x_id, 2 as y_id union all
select null as x_id, null as y_id dbt run -s name_here
dbt test
dbt docs generate
dbt docs serve |
thank you @dbeatty10 ! okay this is working! I wonder if some kind of parsing warning enhancement would be helpful here for future users? |
Good idea about doing some kind of warning if dbt can detect that something is definitely off 💡 In this case, we've chosen for dbt to be very open-ended and allow strings, lists and dictionaries to be configured underneath I think the code example that added confusion in your case was this one: https://docs.getdbt.com/reference/resource-properties/data-tests#test-an-expression So I've opened this documentation issue to see if we can update it to be more clear: dbt-labs/docs.getdbt.com#6436 Since we got to the bottom of things, I'm going to close this issue in favor of updating our docs. |
Is this a new bug in dbt-core?
Current Behavior
we are currently hosting the
dbt docs generate
output on s3 and viewing dbt docs as a static page via index.html. this worked great however after a seemingly benign pull request the index.html fails to render the data, stuck in "loading" state.we have isolated the change to a single commit that compiles correctly with functioning models and source files.
able to replicate with the
manifest.json
locally attempting to load usingdbt docs serve
Expected Behavior
webpage loads OR dbt project parsing highlights issue
Steps To Reproduce
I'm unsure how to reproduce this issue without proviuding our
manifest.json
file?Relevant log output
stacktrace from chrome developer tools
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: