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

dbt utils v1.0.0-rc1 #733

Merged
merged 31 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7fa91d8
add safe_divide documentation
deanna-minnick Oct 3, 2022
cf22c20
add safe_divide macro
deanna-minnick Oct 3, 2022
26eae47
add integration test for safe_divide macro
deanna-minnick Oct 3, 2022
25e4393
Merge changes from main into utils v1 (#699)
joellabes Oct 4, 2022
4f7d3fd
Use backwards comaptible versions of timestamp macro
joellabes Oct 4, 2022
190c1bb
Merge branch 'main' into feature/safe_divide
graciegoheen Oct 5, 2022
4dd0ce2
moved macro and documentation to new SQL generator section
graciegoheen Oct 5, 2022
89f240e
Merge branch 'utils-v1' into feature/safe_divide
deanna-minnick Oct 11, 2022
4b31a72
add tests with expressions
deanna-minnick Oct 11, 2022
38df969
fix syntax errors (#705)
deanna-minnick Oct 13, 2022
df08128
Restore dbt. prefix for all migrated cross-db macros (#701)
SimonQuvang Oct 13, 2022
56cf179
Remove obsolete condition argument from expression_is_true (#700)
miles170 Oct 13, 2022
31c503d
Update star.sql to allow for non-quote wrapped column names (#706)
Doctacon Oct 20, 2022
4fae6c5
Switch to dbt.escape_single_quotes
joellabes Oct 27, 2022
586f278
Change deprecation resolution advice
joellabes Oct 27, 2022
b08f7bb
Wrap xdb warnings in if execute block
joellabes Oct 27, 2022
17b017d
Merge branch 'heads/0.9.3' into utils-v1
joellabes Oct 27, 2022
2703459
Slugify for snowflake (#707)
fivetran-catfritz Nov 2, 2022
04536a1
Merge main into utils-v1 (#726)
joellabes Nov 22, 2022
0ff9ef7
Feat: add macro get_query_results_as_single_value (#696)
Doctacon Nov 24, 2022
c1d8565
Merge branch 'main' into utils-v1
joellabes Nov 28, 2022
d1f0642
Remove rc1 requirement for utils v1
joellabes Nov 28, 2022
e2838c9
Recency truncate date option (#731)
joellabes Nov 29, 2022
9e58405
Output a warning when star finds no columns, not '*' (#732)
joellabes Nov 29, 2022
e6bd6fe
README changes
joellabes Nov 29, 2022
a5a91e5
Merge branch 'utils-v1' of https://github.com/dbt-labs/dbt-utils into…
joellabes Nov 29, 2022
6f5f414
Delete xdb_deprecation_warning.sql
joellabes Nov 29, 2022
b68dd43
Update README.md
joellabes Nov 29, 2022
703bfcb
Remove from ToC
joellabes Nov 29, 2022
9d2df7f
Update toc
joellabes Nov 29, 2022
1777e64
Fix surrogate key variable example
joellabes Dec 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
name: "Run OG Tests - Postgres"
command: ./run_test.sh postgres
- store_artifacts:
path: ./logs
path: integration_tests/logs
- store_artifacts:
path: integration_tests/target

integration-redshift:
docker:
Expand All @@ -35,7 +37,9 @@ jobs:
name: "Run OG Tests - Redshift"
command: ./run_test.sh redshift
- store_artifacts:
path: ./logs
path: integration_tests/logs
- store_artifacts:
path: integration_tests/target

integration-snowflake:
docker:
Expand All @@ -47,8 +51,10 @@ jobs:
name: "Run OG Tests - Snowflake"
command: ./run_test.sh snowflake
- store_artifacts:
path: ./logs

path: integration_tests/logs
- store_artifacts:
path: integration_tests/target

integration-bigquery:
environment:
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
Expand All @@ -64,7 +70,9 @@ jobs:
name: "Run OG Tests - BigQuery"
command: ./run_test.sh bigquery
- store_artifacts:
path: ./logs
path: integration_tests/logs
- store_artifacts:
path: integration_tests/target

workflows:
version: 2
Expand Down
42 changes: 39 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,66 @@
# Unreleased

## New features
- Updated the `slugify` macro to prepend "_" to column names beginning with a number since most databases do not allow names to begin with numbers.
- Implemented an optional `group_by_columns` argument across many of the generic testing macros to test for properties that only pertain to group-level or are can be more rigorously conducted at the group level. Property available in `recency`, `at_least_one`, `equal_row_count`, `fewer_rows_than`, `not_constant`, `not_null_proportion`, and `sequential` tests [#633](https://github.com/dbt-labs/dbt-utils/pull/633)
- New feature to omit the `source_column_name` column on the `union_relations` macro ([#331](https://github.com/dbt-labs/dbt-utils/issues/331), [#624](https://github.com/dbt-labs/dbt-utils/pull/624))
- New macro `get_single_value` ([#696](https://github.com/dbt-labs/dbt-utils/pull/696))
- New feature to select fewer columns in `expression_is_true` ([#683](https://github.com/dbt-labs/dbt-utils/issues/683), [#686](https://github.com/dbt-labs/dbt-utils/pull/686))
- Add `not_empty_string` generic test that asserts column values are not an empty string. ([#632](https://github.com/dbt-labs/dbt-utils/issues/632), [#634](https://github.com/dbt-labs/dbt-utils/pull/634))

## Under the hood
- Remove deprecated table argument from unpivot ([#671](https://github.com/dbt-labs/dbt-utils/pull/671))
- Remove deprecated table argument from `unpivot` ([#671](https://github.com/dbt-labs/dbt-utils/pull/671))
- Delete the deprecated identifier macro ([#672](https://github.com/dbt-labs/dbt-utils/pull/672))
- Handle deprecations in deduplicate macro ([#673](https://github.com/dbt-labs/dbt-utils/pull/673))
- Fully remove varargs usage in surrogate_key and safe_add ([#674](https://github.com/dbt-labs/dbt-utils/pull/674))
- Fully remove varargs usage in `surrogate_key` and `safe_add` ([#674](https://github.com/dbt-labs/dbt-utils/pull/674))
- Remove obsolete condition argument from `expression_is_true` ([#699](https://github.com/dbt-labs/dbt-utils/pull/699))

## Migration instructions
- If your project uses the `expression_is_true` macro, replace `condition` argument with `where`.

Before:
```yaml
version: 2

models:
- name: model_name
tests:
- dbt_utils.expression_is_true:
expression: "col_a + col_b = total"
condition: "created_at > '2018-12-31'"
```
After:
```yaml
version: 2

models:
- name: model_name
tests:
- dbt_utils.expression_is_true:
expression: "col_a + col_b = total"
config:
where: "created_at > '2018-12-31'"
```

## Fixes
- Add star macro option to not encase column names in quotes. ([#706](https://github.com/dbt-labs/dbt-utils/pull/706))
- Explicitly stating the namespace for cross-db macros so that the dispatch logic works correctly by restoring the dbt. prefix for all migrated cross-db macros ([#701](https://github.com/dbt-labs/dbt-utils/pull/701))
- Better handling of whitespaces in the star macro ([#651](https://github.com/dbt-labs/dbt-utils/pull/651))
- Fix to correct behavior in `mutually_exclusive_ranges` test in certain situations when `zero_length_range_allowed: true` and multiple ranges in a partition have the same value for `lower_bound_column`. ([[#659](https://github.com/dbt-labs/dbt-utils/issues/659)], [#660](https://github.com/dbt-labs/dbt-utils/pull/660))
- Fix to utilize dbt Core version of `escape_single_quotes` instead of version from dbt Utils ([[#689](https://github.com/dbt-labs/dbt-utils/issues/689)], [#692](https://github.com/dbt-labs/dbt-utils/pull/692))

## Contributors:
- [@CR-Lough] (https://github.com/CR-Lough) (#706) (#696)
- [@fivetran-catfritz](https://github.com/fivetran-catfritz)
- [@crowemi](https://github.com/crowemi)
- [@SimonQuvang](https://github.com/SimonQuvang) (#701)
- [@christineberger](https://github.com/christineberger) (#624)
- [@epapineau](https://github.com/epapineau) (#634)
- [@courentin](https://github.com/courentin) (#651)
- [@sfc-gh-ancoleman](https://github.com/sfc-gh-ancoleman) (#660)
- [@zachoj10](https://github.com/zachoj10) (#692)
- [@miles170](https://github.com/miles170)
- [@emilyriederer](https://github.com/emilyriederer)
- [@emilyriederer](https://github.com/emilyriederer)

# dbt-utils v0.8.6

Expand Down
Loading