-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove @dataform/assertion-utils in favor of auto-assertions (#1419)
* Remove @dataform/assertion-utils in favor of auto-assertions * Fix action count * Fix quotes in tests
- Loading branch information
Showing
40 changed files
with
86 additions
and
198 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/integration/bigquery_project/definitions/example_assertion_fail.assert.sql
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/integration/bigquery_project/definitions/example_assertion_fail.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
WITH base AS ( | ||
SELECT val1, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
11 changes: 7 additions & 4 deletions
11
tests/integration/bigquery_project/definitions/example_assertion_pass.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
config { type: "assertion" } | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
js { const assertionUtils = require("@dataform/assertion_utils"); } | ||
|
||
${assertionUtils.forDataset(ref("sample_data")).groupedBy(["val"]).getUniqueRowQuery()} | ||
WITH base AS ( | ||
SELECT val1, val2, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1, val2 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
5 changes: 0 additions & 5 deletions
5
tests/integration/bigquery_project/definitions/example_assertion_uniqueness_fail.sqlx
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/integration/bigquery_project/definitions/example_assertion_uniqueness_pass.sqlx
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
tests/integration/bigquery_project/definitions/sample_data.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/integration/postgres_project/definitions/example_assertion_fail.assert.sql
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/integration/postgres_project/definitions/example_assertion_fail.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
WITH base AS ( | ||
SELECT val1, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
11 changes: 7 additions & 4 deletions
11
tests/integration/postgres_project/definitions/example_assertion_pass.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
config { type: "assertion" } | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
js { const assertionUtils = require("@dataform/assertion_utils"); } | ||
|
||
${assertionUtils.forDataset(ref("sample_data")).groupedBy(["val"]).getUniqueRowQuery()} | ||
WITH base AS ( | ||
SELECT val1, val2, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1, val2 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
5 changes: 0 additions & 5 deletions
5
tests/integration/postgres_project/definitions/example_assertion_uniqueness_fail.sqlx
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/integration/postgres_project/definitions/example_assertion_uniqueness_pass.sqlx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/integration/redshift_project/definitions/example_assertion_fail.assert.sql
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/integration/redshift_project/definitions/example_assertion_fail.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
WITH base AS ( | ||
SELECT val1, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
11 changes: 7 additions & 4 deletions
11
tests/integration/redshift_project/definitions/example_assertion_pass.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
config { type: "assertion" } | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
js { const assertionUtils = require("@dataform/assertion_utils"); } | ||
|
||
${assertionUtils.forDataset(ref("sample_data")).groupedBy(["val"]).getUniqueRowQuery()} | ||
WITH base AS ( | ||
SELECT val1, val2, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1, val2 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
5 changes: 0 additions & 5 deletions
5
tests/integration/redshift_project/definitions/example_assertion_uniqueness_fail.sqlx
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/integration/redshift_project/definitions/example_assertion_uniqueness_pass.sqlx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/integration/snowflake_project/definitions/example_assertion_fail.assert.sql
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/integration/snowflake_project/definitions/example_assertion_fail.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
WITH base AS ( | ||
SELECT val1, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
11 changes: 7 additions & 4 deletions
11
tests/integration/snowflake_project/definitions/example_assertion_pass.sqlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
config { type: "assertion" } | ||
config { | ||
type: "assertion" | ||
} | ||
|
||
js { const assertionUtils = require("@dataform/assertion_utils"); } | ||
|
||
${assertionUtils.forDataset(ref("sample_data")).groupedBy(["val"]).getUniqueRowQuery()} | ||
WITH base AS ( | ||
SELECT val1, val2, SUM(1) as row_count FROM ${ref("sample_data_2")} GROUP BY val1, val2 | ||
) | ||
SELECT * FROM base WHERE row_count > 1 |
5 changes: 0 additions & 5 deletions
5
tests/integration/snowflake_project/definitions/example_assertion_uniqueness_fail.sqlx
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/integration/snowflake_project/definitions/example_assertion_uniqueness_pass.sqlx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.