You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -181,14 +181,14 @@ The call signature of `deduplicate` has changed. The previous call signature is
181
181
- The `relation_alias` argument has been removed as the macro now supports `relation` as a string directly. If you were using `relation_alias` to point to a CTE previously then you can now pass the alias directly to `relation`.
If you were relying on the position to match up your optional arguments, this may be a breaking change — in general, we recommend that you explicitly declare any optional arguments (if not all of your arguments!)
392
-
```
392
+
```sql
393
393
-- before: This works on previous version of dbt-utils, but on 0.7.0, the `50` would be passed through as the `order_by` argument
394
394
{% set payment_methods =dbt_utils.get_column_values(
395
395
ref('stg_payments'),
@@ -481,7 +481,7 @@ If you were relying on the position to match up your optional arguments, this ma
481
481
- If your project uses the `get_tables_by_prefix` macro, replace it with `get_relations_by_prefix`. All arguments have retained the same name.
482
482
- If your project uses the `union_tables` macro, replace it with `union_relations`. While the order of arguments has stayed consistent, the `tables` argument has been renamed to `relations`. Further, the default value for the `source_column_name` argument has changed from `'_dbt_source_table'` to `'_dbt_source_relation'` — you may want to explicitly define this argument to avoid breaking changes.
Copy file name to clipboardExpand all lines: README.md
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -498,7 +498,7 @@ models:
498
498
This test confirms that a column contains sequential values. It can be used
499
499
for both numeric values, and datetime values, as follows:
500
500
501
-
```yml
501
+
```yaml
502
502
version: 2
503
503
504
504
seeds:
@@ -627,7 +627,7 @@ This feature is currently available for the following tests:
627
627
628
628
To use this feature, the names of grouping variables can be passed as a list. For example, to test for at least one valid value by group, the `group_by_columns` argument could be used as follows:
629
629
630
-
```
630
+
```yaml
631
631
- name: data_test_at_least_one
632
632
columns:
633
633
- name: field
@@ -726,7 +726,7 @@ This macro is particularly handy when paired with `union_relations`.
726
726
727
727
**Usage:**
728
728
729
-
```
729
+
```sql
730
730
-- Returns a list of relations that match schema_pattern%.table
731
731
{% set relations = dbt_utils.get_relations_by_pattern('schema_pattern%', 'table_pattern') %}
732
732
@@ -781,7 +781,7 @@ handy paired with `union_relations`.
781
781
782
782
**Usage:**
783
783
784
-
```
784
+
```sql
785
785
-- Returns a list of relations that match schema.prefix%
786
786
{% set relations =dbt_utils.get_relations_by_prefix('my_schema', 'my_prefix') %}
787
787
@@ -807,7 +807,7 @@ This macro returns a dictionary from a sql query, so that you don't need to inte
807
807
808
808
**Usage:**
809
809
810
-
```
810
+
```sql
811
811
{% set sql_statement %}
812
812
select city, state from {{ ref('users') }}
813
813
{% endset %}
@@ -835,7 +835,7 @@ This macro returns a single value from a sql query, so that you don't need to in
835
835
836
836
**Usage:**
837
837
838
-
```
838
+
```sql
839
839
{% set sql_statement %}
840
840
selectmax(created_at) from {{ ref('processed_orders') }}
841
841
{% endset %}
@@ -860,7 +860,7 @@ This macro returns the sql required to build a date spine. The spine will includ
860
860
861
861
**Usage:**
862
862
863
-
```
863
+
```sql
864
864
{{ dbt_utils.date_spine(
865
865
datepart="day",
866
866
start_date="cast('2019-01-01' as date)",
@@ -881,7 +881,7 @@ This macro returns the sql required to remove duplicate rows from a model, sourc
881
881
882
882
**Usage:**
883
883
884
-
```
884
+
```sql
885
885
{{ dbt_utils.deduplicate(
886
886
relation=source('my_source', 'my_table'),
887
887
partition_by='user_id, cast(timestamp as day)',
@@ -890,7 +890,7 @@ This macro returns the sql required to remove duplicate rows from a model, sourc
890
890
}}
891
891
```
892
892
893
-
```
893
+
```sql
894
894
{{ dbt_utils.deduplicate(
895
895
relation=ref('my_model'),
896
896
partition_by='user_id',
@@ -899,7 +899,7 @@ This macro returns the sql required to remove duplicate rows from a model, sourc
899
899
}}
900
900
```
901
901
902
-
```
902
+
```sql
903
903
with my_cte as (
904
904
select*
905
905
from {{ source('my_source', 'my_table') }}
@@ -922,7 +922,7 @@ Optionally takes a `unit` string argument ('km' or 'mi') which defaults to miles
0 commit comments