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

Fix dangling datediff reference #233

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Fix dangling datediff reference #233

merged 1 commit into from
Dec 28, 2022

Conversation

clausherther
Copy link
Contributor

No description provided.

@clausherther clausherther merged commit 28a9a75 into main Dec 28, 2022
@clausherther clausherther deleted the fix/datediff-ref branch December 28, 2022 17:40
@forgxyz
Copy link

forgxyz commented Dec 28, 2022

FYI this just nuked some incrementals with the following error. I'm sure it's a quick fix on our end to adjust the test we use for recency checks, but just a heads up @clausherther

(At least I am assuming it was this based on timing, only just investigating now)

Compilation Error in test dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_BLOCK_TIMESTAMP__day__1 (models/silver/silver__blocks.yml)
  'dict object' has no attribute 'dateadd'
  
  > in macro test_expect_row_values_to_have_recent_data (macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql)
  > called by macro default__test_expect_row_values_to_have_recent_data (macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql)
  > called by test dbt_expectations_expect_row_values_to_have_recent_data_silver__blocks_BLOCK_TIMESTAMP__day__1 (models/silver/silver__blocks.yml)

@clausherther
Copy link
Contributor Author

Hmm this only fixed the ref for datediff to be explicit, so instead of calling dbt-core datediff it calls dbt.datediff.
Could you open a new issue for this and provide the necessary info to reproduce? Thanks!

@clausherther
Copy link
Contributor Author

If anything, I would have been this commit which is in 0.8.1 3df4494

@forgxyz
Copy link

forgxyz commented Dec 28, 2022

Yea, it may have been that one as the hourly incremental at 12 eastern is what started failing. Jumped a bit early to this one.

@clausherther
Copy link
Contributor Author

If you wouldn't mind, please open a BUG issue. This shouldn't happen if you're on dbt >= 1.2 I think.

@forgxyz
Copy link

forgxyz commented Dec 28, 2022

Yea, once we get the issue fixed I can ticket what happened.
Looks like the models are on at least dbt 1.2.3

@forgxyz
Copy link

forgxyz commented Dec 28, 2022

Either hard-coding to 0.8.0 or bumping up to dbt 1.3.0 addresses the error

@clausherther
Copy link
Contributor Author

Interesting, I was under the impression the date macros were all in 1.2+, but tbh we're not explicitly testing the CI pipeline for 1.2. I'll take a look, but have a feeling we won't revert the release but instead clarify the dbt version dependency.

@clausherther
Copy link
Contributor Author

I can't reproduce on dbt 1.2, I have a feeling you might have some other cross-package issues with dbt-utils maybe.

@forgxyz
Copy link

forgxyz commented Dec 28, 2022

Likely a cross dependency like that, we'll have to address in greater detail when everyone is back next week. Appreciate your responsiveness!

@clausherther
Copy link
Contributor Author

We pushed a couple of updates to dbt-date and dbt-expectations that should help with issues related to also including dbt-utils. Let me know if that fixes things for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants