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: docs/oss/integrations/dbt-fusion.mdx
+73-1Lines changed: 73 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,79 @@ title: "dbt fusion (Beta)"
7
7
Elemmentary OSS integrates with dbt-fusion, starting with version 0.20.
8
8
Fusion is a complete rewrite of the dbt engine, and provides many benefits, including enhanced performance and static analysis.
9
9
10
-
For more details about dbt-fusion capabilities, installation guidelines and migration best practices, please consult the [dbt-fusion docs](https://docs.getdbt.com/docs/fusion/about-fusion).
10
+
For more details about dbt-fusion capabilities please consult the [dbt-fusion docs](https://docs.getdbt.com/docs/fusion/about-fusion).
11
+
12
+
### Upgrading to dbt-fusion
13
+
14
+
As a part of the migration to dbt-fusion, it is required to remove deprecated syntax from various areas of the dbt project, and YAMLs in particular.
15
+
Specifically for tests the following are important:
16
+
17
+
1. Test arguments must be encapsulated under an `arguments` field.
18
+
2. Configuration fields such as `meta`, `tags` or `severity` must be encapsulated under a `config` field.
19
+
3. Recommended (but not a must) - change the `tests` field to `data_tests` to conform with the current dbt guidelines.
20
+
21
+
Here's an example of an Elementary anomaly test with the old and new syntax:
22
+
23
+
<CodeGroup>
24
+
25
+
```yml Old syntax
26
+
models:
27
+
- name: login_events
28
+
config:
29
+
elementary:
30
+
timestamp_column: "loaded_at"
31
+
tests:
32
+
- elementary.volume_anomalies:
33
+
where_expression: "event_type in ('event_1', 'event_2') and country_name != 'unwanted country'"
34
+
time_bucket:
35
+
period: day
36
+
count: 1
37
+
tags: ["elementary"]
38
+
severity: warn
39
+
meta:
40
+
owner: "@jessica.jones"
41
+
42
+
- name: users
43
+
tests:
44
+
- elementary.volume_anomalies:
45
+
tags: ["elementary"]
46
+
```
47
+
48
+
```yml New syntax
49
+
models:
50
+
- name: login_events
51
+
config:
52
+
elementary:
53
+
timestamp_column: "loaded_at"
54
+
data_tests:
55
+
- elementary.volume_anomalies:
56
+
arguments:
57
+
where_expression: "event_type in ('event_1', 'event_2') and country_name != 'unwanted country'"
58
+
time_bucket:
59
+
period: day
60
+
count: 1
61
+
config:
62
+
tags: ["elementary"]
63
+
severity: warn
64
+
meta:
65
+
owner: "@jessica.jones"
66
+
67
+
- name: users
68
+
data_tests:
69
+
- elementary.volume_anomalies:
70
+
config:
71
+
tags: ["elementary"]
72
+
```
73
+
74
+
</CodeGroup>
75
+
76
+
To facilitate the process of making these changes within your project, dbt introduced a tool called [dbt-autofix](https://github.com/dbt-labs/dbt-autofix) that
77
+
can be used to automatically migrate your project to the new syntax.
78
+
79
+
Before running this tool, **please upgrade** to the most recent dbt-core version - as some of the syntax changes are not supported on older versions.
80
+
81
+
For full information on upgrading from dbt-core to dbt-fusion, please check [dbt-fusion's official upgrade guide](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-fusion).)
0 commit comments