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

expect_table_columns_to_match_ordered_list: refactor row_number to use loop.index #112

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

clausherther
Copy link
Contributor

Fixes #111

@clausherther clausherther merged commit 42a8dc8 into main Sep 28, 2021
@clausherther clausherther deleted the fix/issue-111 branch September 28, 2021 23:39
clausherther added a commit that referenced this pull request Nov 10, 2021
* add `interval` argument

for checking presence every n-date_parts instead of every date_part

* update docs for explaining new `interval` arg

[expect_row_values_to_have_data_for_every_n_datepart](https://github.com/calogica/dbt-expectations/tree/0.4.2#expect_row_values_to_have_data_for_every_n_datepart)

* expect_table_columns_to_match_ordered_list: refactor row_number to use loop.index (#112)

* Fixes #111 - refactor row_number to use loop.index

* Update CHANGELOG

* handle data types for `mod` and incorporate windowing

This test will handle the mod function, which only takes integer arguments, more stably. It also aggregates row counts across intervals when joining on the date spine to correctly detect data presence in the target model

update conditions based on interval

update styling

update styling

* Add support for dbt 0.21 (#116)

* Update README.md

* remove unintentional styling changes

* Fix expect_row_values_to_have_data_for_every_n_datepart errors when both start and end dates are set (#115)

* fix none when both test dates are set

* Add support for dbt 0.21 (#116)

* Update README.md

* fix none when both test dates are set

* Update README

Co-authored-by: Claus Herther <claus@calogica.com>

* add `interval` argument

for checking presence every n-date_parts instead of every date_part

* update docs for explaining new `interval` arg

[expect_row_values_to_have_data_for_every_n_datepart](https://github.com/calogica/dbt-expectations/tree/0.4.2#expect_row_values_to_have_data_for_every_n_datepart)

* handle data types for `mod` and incorporate windowing

This test will handle the mod function, which only takes integer arguments, more stably. It also aggregates row counts across intervals when joining on the date spine to correctly detect data presence in the target model

update conditions based on interval

update styling

update styling

* remove unintentional styling changes

* Change datepart param and fix formatting

* Reformat join to match prior style

* simplify tie-out of model data to spine with interval truncation

the condition added to the model_data CTE is meant to emulate (kind of) Snowflake's [`TIME_SLICE`](https://docs.snowflake.com/en/sql-reference/functions/time_slice.html), which should allow exact matches to the base_dates CTE for better time bucketing

* Add schema test

* replace calls to subquery with calls directly to columns in `model_data` CTE

* add comments/examples for new interval additions

Co-authored-by: Claus Herther <claus@calogica.com>
Co-authored-by: Jeremy Yeo <jeremyyeo@users.noreply.github.com>
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.

expect_table_columns_to_match_ordered_list row_number error on Snowflake
1 participant