dbt-labs / dbt-docs

Auto-generated data documentation site for dbt projects
Apache License 2.0
139 stars 74 forks source link

Docs only showing tags in details section of source objects #488

Closed crystalro0 closed 1 month ago

crystalro0 commented 7 months ago

Describe the bug

User is not seeing their sources details from their yaml file displayed in docs after doing a dbt docs generate on 1.6 and 1.7.

Steps To Reproduce

  1. dev (or prod) env on v1.7 or 1.6
  2. do dbt docs generate
  3. Switch env to 1.5 then generate again, and the details section is populated.

Expected behavior

v1.5

Screenshots and log output

v1.7

The output of dbt --version: 1.6 and 1.7

Additional context

Displayed in dbt Explorer in 1.7.

dbeatty10 commented 7 months ago

Thanks for reporting this @crystalro0 !

I see what you are saying about 1.5 working but 1.6 and 1.7 having a bug.

Reprex

Here's the models/_sources.yml that I used:

version: 2

sources:
  - name: agdirect_dbo
    tables:
      - name: dim_customers

Then I ran these commands using dbt-core:

dbt docs generate
dbt docs serve

When I open the developer tools in Chrome, I can see the following javascript errors:

(index):73 TypeError: Cannot read properties of undefined (reading 'contract')
(index):73 TypeError: Cannot read properties of undefined (reading 'enforced')
image
crystalro0 commented 7 months ago

@dbeatty10 you're awesome! fixed my sandbox with:

version: 2

sources:

  - name: agdirect_dbo
    config:
      contract:
        enforced: false
    database: DEMO_DB
    loader: qlik_replicate
    tables:
      - name: dim_customers

Thank you!

dbeatty10 commented 7 months ago

Nice idea @crystalro0 -- adding the contract config is a clever workaround! 🧠

github-actions[bot] commented 1 month ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

dbeatty10 commented 1 month ago

This looks like it is fixed in v1.8.

I'm not sure if it was fixed in a commit in dbt-docs or something within dbt-core.

Either way, I'm closing this as resolved.