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] Is the '`' symbol in the log the expected result? #196

Open
2 tasks done
peter-huang-xfers opened this issue May 6, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working good_first_issue Good for newcomers

Comments

@peter-huang-xfers
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

04:26:08  1 of 1 START sql table model sta_datamart_dev.pma_segmentation_v3 .............. [RUN]
04:26:12  Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: ['gmv_d90_transfer', 'revenue_d90_transfer']`

Is the '`' symbol in the end of the log the expected result?

Expected Behavior

04:26:08  1 of 1 START sql table model sta_datamart_dev.pma_segmentation_v3 .............. [RUN]
04:26:12  Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: ['gmv_d90_transfer', 'revenue_d90_transfer']

Steps To Reproduce

I'm using BigQuery, and the issue can be reproduced by creating a table without assigning precision and scale to the numeric data type column.

Relevant log output

No response

Environment

- OS:
- Python:
- dbt-core: 1.7.13
- dbt-bigquery: 1.7.7

Which database adapter are you using with dbt?

bigquery

Additional Context

No response

@peter-huang-xfers peter-huang-xfers added bug Something isn't working triage labels May 6, 2024
@dbeatty10 dbeatty10 self-assigned this May 6, 2024
@dbeatty10
Copy link
Contributor

Thanks for noticing this and reaching out @peter-huang-xfers !

This looks like it was unintentional or vestigial to me. But it also seems like it isn't causing any harm -- just a rogue extra character -- does that sound right?

Regardless, it seems like the fix would be easy, just remove the ~ "`" part from here:

{{ exceptions.warn("Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: " ~ col_naked_numeric ~ "`") }}

I would expect these two test cases to still pass after that change:

@dbeatty10 dbeatty10 added good_first_issue Good for newcomers and removed triage labels May 6, 2024
@dbeatty10 dbeatty10 removed their assignment May 6, 2024
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core May 6, 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 good_first_issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants