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/integrations/dbt.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,13 @@ Models **require** a start date for backfilling data through use of the `start`
22
22
> +start: Jan 1 2000
23
23
```
24
24
25
+
### Configuration
25
26
26
-
### Runtime vars
27
+
SQLMesh determines a project's configuration settings from its dbt configuration files.
28
+
29
+
This section describes using runtime variables to create multiple configurations and how to disable SQLMesh's automatic model description and comment registration.
30
+
31
+
#### Runtime vars
27
32
28
33
dbt supports passing variable values at runtime with its [CLI `vars` option](https://docs.getdbt.com/docs/build/project-variables#defining-variables-on-the-command-line).
29
34
@@ -70,6 +75,21 @@ sqlmesh --config marketing_config plan
70
75
71
76
Note that the `--config` option is specified between the word `sqlmesh` and the command being executed (e.g., `plan`, `run`).
72
77
78
+
#### Registering comments
79
+
80
+
SQLMesh automatically registers model descriptions and column comments with the target SQL engine, as described in the [Models Overview documentation](../concepts/models/overview#model-description-and-comments). Comment registration is on by default for all engines that support it (but off by default for Snowflake).
81
+
82
+
dbt offers similar comment registration functionality via its [`persist_docs` model configuration parameter](https://docs.getdbt.com/reference/resource-configs/persist_docs), specified by model. SQLMesh comment registration is configured at the project level, so it does not use dbt's model-specific `persist_docs` configuration.
83
+
84
+
SQLMesh's project-level comment registration defaults are overridden with the `sqlmesh_config()``register_comments` argument. For example, this configuration turns comment registration off:
85
+
86
+
```python
87
+
config = sqlmesh_config(
88
+
Path(__file__).parent,
89
+
register_comments=False,
90
+
)
91
+
```
92
+
73
93
### Running SQLMesh
74
94
75
95
Run SQLMesh as with a SQLMesh project, generating and applying [plans](../concepts/overview.md#make-a-plan), running [tests](../concepts/overview.md#tests) or [audits](../concepts/overview.md#audits), and executing models with a [scheduler](../guides/scheduling.md) if desired.
0 commit comments