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

dbt_utils macros still using dbt_utils.escape_single_quotes #689

Closed
1 of 5 tasks
zachoj10 opened this issue Sep 27, 2022 · 5 comments · Fixed by #692
Closed
1 of 5 tasks

dbt_utils macros still using dbt_utils.escape_single_quotes #689

zachoj10 opened this issue Sep 27, 2022 · 5 comments · Fixed by #692
Labels
bug Something isn't working good first issue

Comments

@zachoj10
Copy link
Contributor

Describe the bug

I'm getting a warning when running dbt that the escape_single_quotes macro is now provided in dbt Core. From my digging around, it seems that there are some dbt_utils macros such as pivot() that are still relying on the version that's in dbt_utils instead of dbt Core.

Steps to reproduce

Running a dbt model that utilizes the pivot macro

Expected results

No warnings from using a dbt_utils macro

Actual results

Warning: the `escape_single_quotes` macro is now provided in dbt Core. It is no longer available in dbt_utils and backwards compatibility will be removed in a future version of the package. Use `escape_single_quotes` (no prefix) instead. The *** model triggered this warning.

Screenshots and log output

image

System information

The contents of your packages.yml file:

packages:
  - package: dbt-labs/dbt_utils
    version: 0.9.1

Which database are you using dbt with?

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

The output of dbt --version:

Core:
  - installed: 1.2.1
  - latest:    1.2.1 - Up to date!

Plugins:
  - snowflake: 1.2.0 - Up to date!```


### Additional context

From a quick search, it seems that the only spot that `dbt_utils.escape_single_quotes` is referenced is in `pivot.sql` 

### Are you interested in contributing the fix?

Would definitely be interested in helping, I think I can put in a PR myself 
@zachoj10 zachoj10 added bug Something isn't working triage labels Sep 27, 2022
@joellabes
Copy link
Contributor

@zachoj10 this is fixed on the utils-v1 branch, but we might as well resolve it on the 0.9.x version as well. I'd welcome a PR!

@jsnb-devoted
Copy link

jsnb-devoted commented Oct 21, 2022

Could we cut a 0.9.3 branch and release a patch version with this in it?
I made a branch off the 0.9.2 tag and added the commit here: https://github.com/jsnb-devoted/dbt-utils/tree/dev/0.9.3
Would love to get this in before the 1.0 release @joellabes

@bmoore813
Copy link

@joellabes poke ☝🏻

@jdub
Copy link
Contributor

jdub commented Nov 14, 2022

@joellabes Current version is 0.9.2 without this fix.

@joellabes
Copy link
Contributor

Just shipped 0.9.5, but this missed the boat 😬 will handle in #728

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants