question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dbt_utils macros still using `dbt_utils.escape_single_quotes`

See original GitHub issue

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 

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jsnb-devotedcommented, Oct 25, 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

1reaction
bmoore813commented, Oct 25, 2022

@joellabes poke ☝🏻

Read more comments on GitHub >

github_iconTop Results From Across the Web

The future of dbt utils · Discussion #487 - GitHub
I did a quick search this morning and found that we use the cross_db_utils in every one of our source packages, and leverage...
Read more >
Upgrading to dbt utils v1.0 - dbt Developer Hub
To resolve this, you can define a custom name for a test. The deprecated unique_where and not_null_where tests have been removed, because where ......
Read more >
Combing dbtutils "surrogate key" with "get filtered columns in ...
Combing dbtutils "surrogate key" with "get filtered columns in relation" produces new warning. Produces this Warning: the surrogate_key macro ...
Read more >
dbt_utils - dbt - Package hub
This dbt package contains macros that can be (re)used across dbt projects. ... Note This readme reflects dbt utils 1.0, currently in release...
Read more >
dispatch | dbt Developer Hub
By using the dispatch macro and project config, it is possible to "shim" existing packages to work on other adapters, by way of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found