dbt-docs icon indicating copy to clipboard operation
dbt-docs copied to clipboard

Docs only showing tags in details section of source objects

Open crystalro0 opened this issue 1 year ago • 3 comments

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.

crystalro0 avatar Jan 29 '24 17:01 crystalro0

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

dbeatty10 avatar Jan 29 '24 19:01 dbeatty10

@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!

crystalro0 avatar Jan 30 '24 00:01 crystalro0

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

dbeatty10 avatar Jan 30 '24 12:01 dbeatty10

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.

github-actions[bot] avatar Jul 29 '24 01:07 github-actions[bot]

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.

dbeatty10 avatar Jul 29 '24 20:07 dbeatty10