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

[CT-2332] [CT-2330] [Bug] Documentation for csv files is not displaying the table name in the Example SQL section #407

Open
2 tasks done
andrea-montes-yello opened this issue Mar 28, 2023 · 5 comments
Labels
bug Something isn't working good_first_issue Good for newcomers

Comments

@andrea-montes-yello
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

after running dbt docs serve, the documentation tied to a seed csv file is not showing the table name in the example SQL section. Instead of the table name, it is displaying undefined.

Expected Behavior

The table name should be displayed in the section Example SQL

Steps To Reproduce

  1. Create documentation for a seed file
  2. dbt docs generate
  3. dbt docs serve
  4. Navigate to the seed documentation
  5. Check what's in the section Example SQL

Relevant log output

No response

Environment

- OS: Mac OS monterrey 12.5.1
- Python: Python 3.8.9
- dbt: 1.3.1

Which database adapter are you using with dbt?

postgres

Additional Context

No response

@andrea-montes-yello andrea-montes-yello added bug Something isn't working triage labels Mar 28, 2023
@github-actions github-actions bot changed the title [Bug] Documentation for csv files is not displaying the table name in the Example SQL section [CT-2330] [Bug] Documentation for csv files is not displaying the table name in the Example SQL section Mar 28, 2023
@dbeatty10 dbeatty10 self-assigned this Mar 28, 2023
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Mar 28, 2023
@dbeatty10
Copy link
Contributor

Good find @andrea-montes-yello !

I think the fix could be as simple as updating this:

const rel = database + model.schema + "." + model.identifier;

To this instead:

        const rel = database + model.schema + "." + model.name;

Going to label as a good_first_issue for a community member to pick up.

@dbeatty10 dbeatty10 added good_first_issue Good for newcomers and removed triage labels Mar 28, 2023
@dbeatty10 dbeatty10 removed their assignment Mar 28, 2023
@github-actions github-actions bot changed the title [CT-2330] [Bug] Documentation for csv files is not displaying the table name in the Example SQL section [CT-2332] [CT-2330] [Bug] Documentation for csv files is not displaying the table name in the Example SQL section Mar 28, 2023
@dbeatty10
Copy link
Contributor

Supposing the user has dbt-duckdb installed, the reprex ("reproducible example") is as simple as:

dbt_project.yml

name: "my_dbt_project"
version: "1.0.0"
config-version: 2
profile: "sandcastle-duckdb"

seeds/my_seed.csv

id,fruit
1,orange

profiles.yml

sandcastle-duckdb:
  target: dev
  outputs:
    dev:
      type: duckdb
      schema: dev
      path: 'triage.duckdb'
      threads: 1

Copy link
Contributor

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 github-actions bot added the Stale label Mar 23, 2024
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
@bdtoole
Copy link

bdtoole commented Aug 2, 2024

I just noticed this issue still persists with the latest dbt 1.8. It'd be great if this could be re-opened and addressed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good_first_issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants