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/concepts/models/external_models.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,8 @@ If SQLMesh does not have access to an external table's metadata, the table will
56
56
57
57
In some use-cases such as [isolated systems with multiple gateways](../../guides/isolated_systems.md#multiple-gateways), there are external models that only exist on a certain gateway.
58
58
59
+
**Gateway names are case-insensitive in external model configurations.** You can specify the gateway name using any case (e.g., `gateway: dev`, `gateway: DEV`, `gateway: Dev`) and SQLMesh will handle the matching correctly.
60
+
59
61
Consider the following model that queries an external table with a dynamic database based on the current gateway:
60
62
61
63
```
@@ -100,7 +102,7 @@ This example demonstrates the structure of a `external_models.yaml` file:
Copy file name to clipboardExpand all lines: docs/guides/configuration.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ SQLMesh creates schemas, physical tables, and views in the data warehouse/engine
322
322
323
323
The default SQLMesh behavior described in the FAQ is appropriate for most deployments, but you can override *where* SQLMesh creates physical tables and views with the `physical_schema_mapping`, `environment_suffix_target`, and `environment_catalog_mapping` configuration options.
324
324
325
-
You can also override *what* the physical tables are called by using the `physical_table_naming_convention` option.
325
+
You can also override *what* the physical tables are called by using the `physical_table_naming_convention` option.
326
326
327
327
These options are in the [environments](../reference/configuration.md#environments) section of the configuration reference page.
328
328
@@ -767,7 +767,9 @@ Even though the second change should have been a metadata change (thus not requi
767
767
768
768
The `gateways` configuration defines how SQLMesh should connect to the data warehouse, state backend, and scheduler. These options are in the [gateway](../reference/configuration.md#gateway) section of the configuration reference page.
769
769
770
-
Each gateway key represents a unique gateway name and configures its connections. For example, this configures the `my_gateway` gateway:
770
+
Each gateway key represents a unique gateway name and configures its connections. **Gateway names are case-insensitive** - SQLMesh automatically normalizes gateway names to lowercase during configuration validation. This means you can use any case in your configuration files (e.g., `MyGateway`, `mygateway`, `MYGATEWAY`) and they will all work correctly.
771
+
772
+
For example, this configures the `my_gateway` gateway:
Copy file name to clipboardExpand all lines: docs/reference/configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ SQLMesh UI settings.
141
141
142
142
The `gateways` dictionary defines how SQLMesh should connect to the data warehouse, state backend, test backend, and scheduler.
143
143
144
-
It takes one or more named `gateway` configuration keys, each of which can define its own connections. A named gateway does not need to specify all four components and will use defaults if any are omitted - more information is provided about [gateway defaults](#gatewayconnection-defaults) below.
144
+
It takes one or more named `gateway` configuration keys, each of which can define its own connections. **Gateway names are case-insensitive** - SQLMesh normalizes all gateway names to lowercase during configuration validation, allowing you to use any case when referencing gateways. A named gateway does not need to specify all four components and will use defaults if any are omitted - more information is provided about [gateway defaults](#gatewayconnection-defaults) below.
145
145
146
146
For example, a project might configure the `gate1` and `gate2` gateways:
147
147
@@ -247,7 +247,7 @@ If a configuration contains multiple gateways, SQLMesh will use the first one in
| `default_gateway` | The name of a gateway to use if one is not provided explicitly (Default: the gateway defined first in the `gateways` option) | string | N |
250
+
| `default_gateway` | The name of a gateway to use if one is not provided explicitly (Default: the gateway defined first in the `gateways` option). Gateway names are case-insensitive. | string | N |
0 commit comments