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
In some occasions the order of rows of the result of a test is nondeterministic in BigQuery. This makes it very hard to come up with the expected order of rows. There should be some sort of flag in the config block of a test to indicate that the order of expected rows does not matter.
The text was updated successfully, but these errors were encountered:
config {
type: "table",
assertions: {
uniqueKey: ["user_id"],
nonNull: ["user_id", "customer_id"],
rowConditions: [
'row like A',
'row like B'
]
}
}
SELECT1
Becomes the execution SQL of:
create or replace view `cloud-dataform-testing.dataform_core_testing.dataform_core_testing_tmp_assertions_rowConditions`asSELECT'row like A'AS failing_row_condition,
*FROM`cloud-dataform-testing.dataform_core_testing.tmp`WHERE NOT (row like A)
UNION ALLSELECT'row like B'AS failing_row_condition,
*FROM`cloud-dataform-testing.dataform_core_testing.tmp`WHERE NOT (row like B)
UNION ALLSELECT'user_id IS NOT NULL'AS failing_row_condition,
*FROM`cloud-dataform-testing.dataform_core_testing.tmp`WHERE NOT (user_id IS NOT NULL)
UNION ALLSELECT'customer_id IS NOT NULL'AS failing_row_condition,
*FROM`cloud-dataform-testing.dataform_core_testing.tmp`WHERE NOT (customer_id IS NOT NULL)
(using bazel run //packages/@dataform/cli:bin run <dir> -- --dry-run --json)
I believe @igofunke is talking about dataform unit tests, not assertions.
There used to be docs about unit tests available at dataform.co, but they are gone now and I can't find the equivalent in GCP docs. I looked quickly and this looks like where unit tests are run.
In some occasions the order of rows of the result of a test is nondeterministic in BigQuery. This makes it very hard to come up with the expected order of rows. There should be some sort of flag in the config block of a test to indicate that the order of expected rows does not matter.
The text was updated successfully, but these errors were encountered: