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/guides/multi_engine.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,13 @@ SQLMesh enables this decoupling by supporting multiple engine adapters within a
11
11
Configuring your project to use multiple engines follows a simple process:
12
12
13
13
- Include all required [gateway connections](../reference/configuration.md#connection) in your configuration.
14
-
- Specify the `gateway` to be used for execution in the `MODEL` DDL.
14
+
- Set `model_defaults.gateway` to the gateway most models should use, and override individual models
15
+
with `gateway` in the `MODEL` DDL when needed.
15
16
16
-
If no gateway is explicitly defined for a model, the [default_gateway](../reference/configuration.md#default-gateway) of the project is used.
17
+
If no gateway is explicitly defined for a model, SQLMesh uses the project's
18
+
[`model_defaults.gateway`](../reference/model_configuration.md#model-defaults), when configured,
19
+
and otherwise uses its [default_gateway](../reference/configuration.md#default-gateway). This lets
20
+
all managed models in a project use a gateway without repeating it in every model definition.
17
21
18
22
By default, virtual layer views are created in the `default_gateway`. This approach requires that all engines can read from and write to the same shared catalog, so a view in the `default_gateway` can access a table in another gateway.
0 commit comments