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
feat: support new dbt semantic layer spec and add integration_tests_sl
- Fix get_metric_values.sql to handle null type_params.measure and
cumulative_type_params in the new SL spec (metrics embedded in models
instead of top-level semantic_models)
- Add integration_tests_sl project: copy of integration_tests migrated
to the latest SL YAML spec via dbt-autofix --semantic-layer
- Run integration_tests_sl as a third project in run_fusion_tests.sh
- Add dbt_integration_fusion_duckdb tox env and restructure fusion.yml
to run DuckDB tests first, then cloud (Snowflake) only if DuckDB passes
The models within this folder (barring those in models/audit_schema_tests) represent a dbt project with poor DAG modeling. Error detection tools within this package are tested on this dbt project.
4
+
5
+
<imgwidth="1377"alt="DAG of the test dbt project"src="https://user-images.githubusercontent.com/73915542/170353654-58ad303c-adaa-49f6-86b8-723543eb2d3d.png">
6
+
7
+
## Adding an Integration Test
8
+
Create a seed which matches the intended output of your model and add equality tests comparing the output to your seed to the output of your model.
9
+
10
+
## Local tests
11
+
12
+
### AWS Athena
13
+
14
+
To run tests locally, please follow instructions:
15
+
16
+
* Set up environment variables:
17
+
18
+
```bash
19
+
ATHENA_S3_STAGING_DIR=
20
+
ATHENA_S3_DATA_DIR=
21
+
ATHENA_REGION=
22
+
ATHENA_SCHEMA=
23
+
ATHENA_WORKGROUP=
24
+
```
25
+
26
+
* Add `profiles.yml` file based on [sample](ci/sample.profiles.yml):
description: "This table shows one record for every resource and each of its downstream children (including itself). It includes models, snapshots, exposures, metrics and seeds"
6
+
columns:
7
+
- name: path
8
+
description: unique identifier representing a distinct path from each resource to another resource
9
+
data_tests:
10
+
- unique
11
+
- not_null
12
+
13
+
- name: int_all_graph_resources_dpe
14
+
description: "This table shows one record for each enabled resource in the graph and information about that resource."
15
+
columns:
16
+
- name: resource_id
17
+
data_tests:
18
+
- unique
19
+
- not_null
20
+
- name: on_schema_change
21
+
description: this contains the on_schema_change setting for incremental models. This column was sometimes an empty string, so should be tested to detect regressions
22
+
data_tests:
23
+
- not_null:
24
+
config:
25
+
where: "resource_type = 'model' and materialized = 'incremental'"
26
+
- name: model_type
27
+
data_tests:
28
+
- dbt_utils.expression_is_true:
29
+
arguments:
30
+
expression: "= 'base'"
31
+
config:
32
+
where: "resource_name = 'base_model_10'"
33
+
34
+
- name: int_direct_relationships_dpe
35
+
description: "This table shows one record for each direct parent/child pair in the graph."
0 commit comments