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

dbt docs generate adding both source and model column names (source and model share name) #1883

Closed
jkornblum opened this issue Nov 1, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@jkornblum
Copy link

Describe the bug

When running dbt docs generate and dbt docs serve the documentation shows the columns from both my source data and model data in the model documentation and in source documentation. I'm guessing this is because they share a name case_info and dbt doesn't know to keep them separate when building the catalog.

Snippet from sources.yml

    database: RAW_DEV
    tables:
      - name: area_info
        identifier: PSO_RESULT_AREA_INFO
      - name: case_info
        identifier: PSO_RESULT_CASE_INFO

I have a models/pso_results/case_info.sql file

{{
  config(
    alias="PSO_RESULT_CASE_INFO",
  )
}}

with clean_case_info as (
    select "//CaseID" as CASE_ID,
           "Name" as "NAME",
           "TaskID" as TASK_ID,
           ISO as ISO,
           "LoadDateTime" as LOADED_AT
from {{ source('pso_results', 'case_info') }}
)

select * from clean_case_info

when I serve docs I see this
Screen Shot 2019-11-01 at 4 50 34 PM

Expected behavior

I expected dbt docs to understand and keep separate a source and a model regardless if the name matched.

System information

The output of dbt --version:

installed version: 0.14.3
latest version: 0.14.3

The operating system you're using:
Mac OSX 10.15

The output of python --version:

Python 3.7.3
@jkornblum jkornblum added bug Something isn't working triage labels Nov 1, 2019
@drewbanin drewbanin added duplicate This issue or pull request already exists and removed bug Something isn't working triage labels Nov 1, 2019
@drewbanin
Copy link
Contributor

Hey @jkornblum - we had an issue over here #1708 which was fixed in #1774. Going to close this one as a duplicate - the fix will be out in 0.15.0 later this month!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants