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

Deprecation Warning from macros/schema_tests/not_null_proportion.sql #415

Closed
1 of 5 tasks
emmyoop opened this issue Sep 15, 2021 · 3 comments
Closed
1 of 5 tasks
Labels
bug Something isn't working good first issue Stale

Comments

@emmyoop
Copy link
Member

emmyoop commented Sep 15, 2021

Describe the bug

dbt run on a project that has dbt-utils installed will trigger a Deprecation Warning.

Steps to reproduce

Set up a simple dbt project with dbt-utils installed.

Expected results

dbt run gives no warnings.

Actual results

dbt run produces a Deprecation Warning.

Screenshots and log output

(env) emily@Emily-Rockman jaffle-shop % dbt run
Running with dbt=0.21.0-b1
* Deprecation Warning: The "packages" argument of adapter.dispatch() has been
deprecated. Use the "macro_namespace" argument instead.
Raised during dispatch for: test_not_null_proportion
For more information, see:
https://docs.getdbt.com/reference/dbt-jinja-functions/dispatch
Found 2 models, 4 tests, 0 snapshots, 0 analyses, 353 macros, 0 operations, 0 seed files, 0 sources, 0 exposures

13:22:41 | Concurrency: 4 threads (target='dev')
13:22:41 |
13:22:41 | 1 of 2 START table model dbt_testing.my_first_dbt_model.............. [RUN]
13:22:41 | 1 of 2 OK created table model dbt_testing.my_first_dbt_model......... [SELECT 2 in 0.09s]
13:22:41 | 2 of 2 START view model dbt_testing.my_second_dbt_model.............. [RUN]
13:22:42 | 2 of 2 OK created view model dbt_testing.my_second_dbt_model......... [CREATE VIEW in 0.06s]
13:22:42 |
13:22:42 | Finished running 1 table model, 1 view model in 0.29s.

Completed successfully

Done. PASS=2 WARN=0 ERROR=0 SKIP=0 TOTAL=2

System information

The contents of your packages.yml file:

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

Which database are you using dbt with?

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

The output of dbt --version:

installed version: 0.21.0-b1

Additional context

This is related to the recent changes in Cherry Pick: not null proportion schema test #411. macro_namespace should be used instead of packages in macros/schema_tests/not_null_proportion.sql. See docs for more info.

Are you interested in contributing the fix?

@emmyoop emmyoop added bug Something isn't working triage labels Sep 15, 2021
@jtcohen6
Copy link
Contributor

Good call @emmyoop, thanks for opening!

@jasnonaz Apologies for not catching the outdated dispatch usage in #375/#411. This should be as simple as replacing this line:

{{ return(adapter.dispatch('test_not_null_proportion', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}

With:

{{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }} 

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 8, 2023
@github-actions
Copy link

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
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 Stale
Projects
None yet
Development

No branches or pull requests

3 participants