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: _posts/2024-12-08-dbt-expectations.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Given
21
21
This is a widely used tool in data engineering, and in order to try it out and evaluate this tool, I undertook the following Udemy course, the screenshots and material are based on this:
This course covers the theory and practical application of a data project using snowflake as the data warehouse, and the open source version of dbt. What was particularly relevant for a tester are the sections covering dbt expectations<addlink>. This post will explain at a high level what dbt expectations can do, how it can enable QA in a data ingestion/data transformation project rather than a hand on how to' guide.
27
27
@@ -37,25 +37,25 @@ When the package is imported etc. the tests are written in the schema.yml file.
37
37
38
38
#### Basic Expectations:
39
39
40
-
<b>not_null:</b> Ensures that the column doesn't contain null values.
41
-
<b>unique:</b> Verifies that all values in the column are distinct.
40
+
<li>not_null: Ensures that the column doesn't contain null values.</li>
41
+
<li>unique: Verifies that all values in the column are distinct.</li>
42
42
43
43
#### Relationship Expectations:
44
44
45
-
<b>relationships:</b> Checks if a foreign key relationship <b>exists between two columns in different models.
45
+
</li>relationships: Checks if a foreign key relationship exists between two columns in different models.</li>
46
46
47
47
#### Value-Based Expectations:
48
48
49
-
<b>accepted_values:</b> Ensures that the column only contains specific values from a predefined list.
50
-
<b>positive_value:</b> Verifies that the column values are positive numbers.
49
+
<li>accepted_values: Ensures that the column only contains specific values from a predefined list.</li>
50
+
<li>positive_value:</b> Verifies that the column values are positive numbers.</li>
51
51
52
52
#### Statistical Expectations:
53
53
54
-
#### dbt_expectations. <b>expect_table_row_count_to_equal_other_table:</b> Compares the row count of two tables.
54
+
<li>dbt_expectations. expect_table_row_count_to_equal_other_table: Compares the row count of two tables.</li>
55
55
56
-
<b>dbt_expectations.expect_column_values_to_be_of_type: </b>Checks the data type of a column.
57
-
<b>dbt_expectations.</b>expect_column_quantile_values_to_be_between: Verifies that quantile values fall within a specific range.
58
-
<b>dbt_expectations.expect_column_max_to_be_between:</b> Ensures that the maximum value of a column is within a certain range.
56
+
</li>dbt_expectations.expect_column_values_to_be_of_type: Checks the data type of a column.</li>
57
+
<li>dbt_expectations.expect_column_quantile_values_to_be_between: Verifies that quantile values fall within a specific range.</li>
58
+
<li>dbt_expectations.expect_column_max_to_be_between: Ensures that the maximum value of a column is within a certain range.</li>
0 commit comments