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

mono-start and mono-pause unless fail #45

Merged
merged 13 commits into from
May 31, 2021
Merged

mono-start and mono-pause unless fail #45

merged 13 commits into from
May 31, 2021

Conversation

dataders
Copy link
Contributor

@dataders dataders commented May 9, 2021

save money. only turn on the Synapse db when Circle CI needs to run. Problem is how to only resume and pause once. This PR addresses that.

@dataders
Copy link
Contributor Author

@clausherther can you help me understand why this expression is now false for 1/2 rows after the two recent PRs you merged?
week_of_year = {{ dbt_date.week_of_year('date_day') }}"
which I think is the corresponding true statement based on this test name result.
dbt_utils_expression_is_true_test_dates_week_of_year_dbt_date_week_of_year_date_day_

I saw the new get_test_dates() but thought it only made changes to how how iso_week_of_year() works... or maybe the test failing here does have to do with iso_week_year? I'm confused -- help please!

Completed with 1 error and 0 warnings:

Failure in test dbt_utils_expression_is_true_test_dates_week_of_year_dbt_date_week_of_year_date_day_ (models/test_dates.yml)
  Got 1 result, expected 0.

  compiled SQL at target/compiled/dbt_date_integration_tests/models/test_dates.yml/schema_test/dbt_utils_expression_is_true_test_dates_13f7b863f7daf107edd9fbb8db9ccb79.sql

Done. PASS=13 WARN=0 ERROR=1 SKIP=0 TOTAL=14

@clausherther
Copy link

I made it easier to implement platform-specific date test data. For example, on Snowflake both week_of_year and iso_week_of_year show the iso week in snowflake__get_test_dates since that's the default on my Snowflake test instance. If your SQL server instance does that same, I think you can just shim your own version of get_test_dates to make this for SQL Server maybe? For example: https://github.com/calogica/presto-utils/blob/main/integration_tests/dbt_date/macros/get_test_dates.sql

Those two test dates belong to the same Sunday week, but different Monday weeks. On most platforms I've tested against that should be Sunday week 48. But I've seen things like Google Sheets call this week 49 for both, so maybe that's what SQL Server is returning? Dates and weeks are the worst cross platform...

@dataders
Copy link
Contributor Author

@clausherther thanks so much for getting back to me.

What's bizarre to me is that:

  1. all tests were passing last week, and
  2. the test that is failing isn't about the iso_week_of_year() macro which I know changed recently, rather the week_of year() macro which didn't change. Additionally, the week_of_year row values in get_test_dates() didn't change compared to last week's version they've always been 48.

So what did change?

@dataders dataders marked this pull request as ready for review May 31, 2021 02:12
@dataders dataders merged commit 29cdbd1 into main May 31, 2021
@dataders dataders deleted the optimize-flow branch November 12, 2021 06:23
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