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

Backticks cause false positive is_empty_fct_hard_coded_references error #524

Closed
1 of 6 tasks
shah204 opened this issue Jan 14, 2025 · 1 comment
Closed
1 of 6 tasks
Labels
bug Something isn't working triage

Comments

@shah204
Copy link

shah204 commented Jan 14, 2025

Describe the bug

Backticks cause false positive is_empty_fct_hard_coded_references error.

Steps to reproduce

We had a model that included a commented out description, and in this description we used backticks. The package flagged these backticks as an example of a hard coded reference.

Expected results

Backticks are not flagged.

Actual results

Backticks seem to be read as a hard-coded reference.

Screenshots and log output

Image Image

System information

The contents of your packages.yml file:

packages:
  #- package: dbt-labs/dbt_utils
  #  version: 1.1.0

  - package: dbt-labs/dbt_project_evaluator
    version: 0.14.2

  - package: dbt-labs/codegen
    version: 0.12.1

  # the tiktok_ads package adds dbt_utils, fivetran_utils, and
  # titktok_ads_source packages as dependencies so they can't
  # be listed twice in the package root directory.

  - package: fivetran/tiktok_ads
    version: 0.3.0

  - package: fivetran/zendesk
    version: 0.10.1

  - package: calogica/dbt_date
    version: [">=0.7.0", "<0.8.0"]

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • trino/starburst
  • other (specify: ____________)

The output of dbt --version:

Core:
  - installed: 1.8.9
  - latest:    1.9.1 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 1.8.2 - Update available!
  - redshift: 1.8.1 - Update available!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Additional context

N/A

Are you interested in contributing the fix?

No

@shah204 shah204 added bug Something isn't working triage labels Jan 14, 2025
@b-per
Copy link
Collaborator

b-per commented Jan 16, 2025

Hi!

The model is using some regexes to try to identify the hard coded refs, so it is no 100% perfect today, and we won't get it to 100% perfect.

I'd recommend to:

  • add -- before your individual comments (we remove the lines that start with --)
  • or change the comment so that it doesn't have ` in it
  • or change the comment so that you don't use the word from 😄
  • or add an exception

@b-per b-per closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants