Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0052-sql-quality FR-009
Tests that a schema asks for (commons data 0052-sql-quality): what a schema says of its tables (a column that is not null, a primary key, the codes of a code table) is also a data test, as dbt's codegen writes them from a database. A database that enforces the schema passes them; one that was loaded around it, or a view of it, is held to them.
Source: commons/data/sql/quality/derive.ts
1 of 1 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
function testsFromState(state: State, relation?: (table: string) => Relation): readonly DqTest[]
The tests of a state: not_null for a column that is not null (a key's columns are covered by the key), unique and not_null for a one-column primary key, unique_combination_of_columns for a longer one, and accepted_values for the codes of a code table.
| Parameter | What it is |
|---|
relation | the relation a table of the state is in the database as |
Imported by 7 tests of the run (7 passed, 0 failed): the library's results