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

[BUG] incorrectly identifying column names with "_" #489

Open
davidggphy opened this issue Aug 5, 2024 · 0 comments
Open

[BUG] incorrectly identifying column names with "_" #489

davidggphy opened this issue Aug 5, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation triaged: no Hasn't been approved for future implementation

Comments

@davidggphy
Copy link

Describe the bug
When running dbt-coves generate properties selecting Update all, I get new lines in the documentation with non-existing columns.

Original documentation (including only part of the columns):

version: 2

models:
  - name: stg_mysql_client
    description: ""
    columns:
      - name: account_
        data_type: STRING

After running the command:
Original documentation (including only part of the columns):

version: 2

models:
  - name: stg_mysql_client
    description: ""
    columns:
      - name: account_
        data_type: STRING
      - name: account

Same happens with other models containing columns ending in _, like letters_. Since dbt-coves is not able to properly identify the name of these columns.

To Reproduce
Steps to reproduce the behaviour:

  1. Create model test_model.sql containing:
select 1 as test_column,
         2 as test_column_,
         3 as another_col_
  1. Compile it dbt run -s test_model
  2. Generate documentation dbt-coves generate properties --select test_model

You obtain test_model.ylm:

version: 2

models:
  - name: test_model
    description: ""
    columns:
      - name: test_column
      - name: test_column
      - name: another_col

Expected behaviour

Obtain a documentation file test_model.ylm:

version: 2

models:
  - name: test_model
    description: ""
    columns:
      - name: test_column
      - name: test_column_
      - name: another_col_

Desktop (please complete the following information):

  • OS: iOS
  • Browser: N/A
  • Version 14.5
  • dbt-coves v1.8.0
  • dbt v1.8.3
  • connector: bigquery
@davidggphy davidggphy added the bug Something isn't working label Aug 5, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation triaged: no Hasn't been approved for future implementation labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation triaged: no Hasn't been approved for future implementation
Projects
None yet
Development

No branches or pull requests

1 participant