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

dateadd deprecation warning triggered when dateadd is used within date_spine #722

Closed
1 of 5 tasks
LoicChesneau opened this issue Nov 14, 2022 · 1 comment
Closed
1 of 5 tasks
Labels
bug Something isn't working

Comments

@LoicChesneau
Copy link

Describe the bug

Warning seems to be raised mistakenly because a deprecated dbt_utils feature is called within a valid dbt_utils function.

Steps to reproduce

Run the following as a model (in this example, the name of the model is snowflake_amortized_rates

{{ 
	dbt_utils.date_spine(
		start_date = "to_date('11/01/2009', 'mm/dd/yyyy')",
		datepart = "day",
		end_date = "dateadd(year, 40, current_date)"
	)
}}

Expected results

A fricitionless run

Actual results

I get the following warning

Warning: the `dateadd` 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 `dateadd` (no prefix) instead. The getaround_eu.snowflake_amortized_rates 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.8.0
  - package: dbt-labs/audit_helper
    version: 0.5.0
  - package: dbt-labs/codegen
    version: 0.5.0
  - package: dbt-labs/dbt_external_tables
    version: 0.8.0
  - package: calogica/dbt_expectations
    version: [">=0.5.0", "<0.6.0"]
  - package: tnightengale/dbt_meta_testing
    version: 0.3.5

Which database are you using dbt with?

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

The output of dbt --version:

Core:
  - installed: 1.2.2
  - latest:    1.3.0 - 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:
  - snowflake: 1.2.0 - 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

The model comes from a previously maintained by Gitlab package
https://gitlab.com/gitlab-data/snowflake_spend

Are you interested in contributing the fix?

I wouldn't know where to start

@joellabes
Copy link
Contributor

@LoicChesneau this is resolved in 0.9.5 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants