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

persist_docs functionality doesn't persist descriptions on nested bigquery columns #2549

Closed
1 of 5 tasks
bodschut opened this issue Jun 16, 2020 · 2 comments · Fixed by #2550
Closed
1 of 5 tasks

persist_docs functionality doesn't persist descriptions on nested bigquery columns #2549

bodschut opened this issue Jun 16, 2020 · 2 comments · Fixed by #2550
Labels
bigquery enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@bodschut
Copy link
Contributor

Describe the bug

With the release of dbt 0.17.0, the persist_docs functionality was enhanced to also apply column descriptions to bigquery when they are supplied in a schema.yml file. However, it seems that it only takes into account top-level columns and there is no way to persist a description to a nested column (ie a field that is part of a RECORD type bigquery column).

Steps To Reproduce

Suppose you create a simple test model using dbt in bigquery:

SELECT
    STRUCT(
        STRUCT(
            1 AS level_3_a,
            2 AS level_3_b
        ) AS level_2
    ) AS level_1

This will create a view/table in bigquery with the following schema:
image

We can describe this table in a schema.yml file and add descriptions as follows:

version: 2

models:
  - name: test_nested
  
    columns:
      - name: level_1
        description: level_1 description
      - name: level_1.level_2.level_3_a
        description: level_3_a description

When we now perform a dbt run on this model, only the description on the top level field is added and no warnings or errors are generated by dbt:
image

Expected behavior

When providing descriptions for nested fields (preferably using the dotted syntax as shown above), the descriptions should be correctly persisted on nested fields.

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

installed version: 0.17.0
   latest version: 0.17.0

Up to date!

Plugins:
  - snowflake: 0.17.0
  - postgres: 0.17.0
  - bigquery: 0.17.0
  - redshift: 0.17.0

The operating system you're using:
Mac OS 10.15.3

The output of python --version:
Python 3.7.5

@bodschut bodschut added bug Something isn't working triage labels Jun 16, 2020
@drewbanin drewbanin added good_first_issue Straightforward + self-contained changes, good for new contributors! bigquery enhancement New feature or request and removed triage bug Something isn't working labels Jun 16, 2020
@bodschut
Copy link
Contributor Author

Should we close this issue @beckjake ?

@drewbanin
Copy link
Contributor

closed by #2550

Thanks for your contribution @bodschut!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants