Skip to content

Commit 660454e

Browse files
author
Jacob Beck
committed
Merge branch 'master' into remove-list-relations
2 parents c633db9 + 820aadb commit 660454e

File tree

14 files changed

+77
-28
lines changed

14 files changed

+77
-28
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
command: |
1919
python3 -m venv venv
2020
. venv/bin/activate
21+
2122
pip install dbt
23+
2224
mkdir -p ~/.dbt
2325
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
2426
@@ -33,8 +35,8 @@ jobs:
3335
. venv/bin/activate
3436
cd integration_tests
3537
dbt deps
36-
dbt seed
37-
dbt run
38+
dbt seed --full-refresh
39+
dbt run --full-refresh
3840
dbt test
3941
4042
- save_cache:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Usage:
175175
```
176176

177177
#### star ([source](macros/sql/star.sql))
178-
This macro generates a list of all fields that exist in the `from` relation, excluding any fields listed in the `except` argument. The construction is identical to `select * from {{ref('my_model')}}`, replacing star (`*`) with the star macro.
178+
This macro generates a list of all fields that exist in the `from` relation, excluding any fields listed in the `except` argument. The construction is identical to `select * from {{ref('my_model')}}`, replacing star (`*`) with the star macro. This macro also has an optional `relation_alias` argument that will prefix all generated fields with an alias.
179179

180180
Usage:
181181
```

integration_tests/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

22
test-postgres:
3-
dbt seed --target postgres
4-
dbt run --target postgres --exclude test_insert_by_period
3+
dbt seed --target postgres --full-refresh
4+
dbt run --target postgres --full-refresh --exclude test_insert_by_period
55
dbt test --target postgres --exclude test_insert_by_period
66

77
test-redshift:
8-
dbt seed --target redshift
9-
dbt run --target redshift
8+
dbt seed --target redshift --full-refresh
9+
dbt run --target redshift --full-refresh
1010
dbt test --target redshift
1111

1212
test-snowflake:
13-
dbt seed --target snowflake
14-
dbt run --target snowflake
13+
dbt seed --target snowflake --full-refresh
14+
dbt run --target snowflake --full-refresh
1515
dbt test --target snowflake
1616

1717
test-bigquery:
18-
dbt seed --target bigquery
19-
dbt run --target bigquery
18+
dbt seed --target bigquery --full-refresh
19+
dbt run --target bigquery --full-refresh
2020
dbt test --target bigquery
2121

2222
test-all: test-postgres test-redshift test-snowflake test-bigquery
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
id,name,favorite_color
2+
1,"drew",
3+
2,"bob",
4+
3,"alice",
5+
1,,"green"
6+
2,,"pink"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
id,name
2+
1,drew
3+
2,bob
4+
3,alice
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
id,favorite_color
2+
1,green
3+
2,pink

integration_tests/models/sql/schema.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ test_surrogate_key:
5656
constraints:
5757
assert_equal:
5858
- {actual: actual, expected: expected}
59+
60+
test_union:
61+
constraints:
62+
dbt_utils.equality:
63+
- ref('data_union_expected')

integration_tests/models/sql/test_get_column_values.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
select
6+
{% set columns = columns if columns is iterable else [] %}
67
{% for column in columns -%}
78

89
sum(case when field = '{{ column }}' then 1 else 0 end) as count_{{ column }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
select
3+
id,
4+
name,
5+
favorite_color
6+
7+
from {{ ref('test_union_base') }}
8+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
{{ dbt_utils.union_tables([
3+
ref('data_union_table_1'),
4+
ref('data_union_table_2')]
5+
) }}
6+

0 commit comments

Comments
 (0)