Skip to content

Commit 1fa1a4c

Browse files
authored
Docs: Add description for the environment_catalog_mapping setting to the configuration reference (#2906)
1 parent 1743b4f commit 1fa1a4c

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

docs/reference/configuration.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ Configuration options for SQLMesh project directories.
2525

2626
Configuration options for SQLMesh environment creation and promotion.
2727

28-
| Option | Description | Type | Required |
29-
|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------:|:--------:|
30-
| `snapshot_ttl` | The period of time that a model snapshot not a part of any environment should exist before being deleted. This is defined as a string with the default `in 1 week`. Other [relative dates](https://dateparser.readthedocs.io/en/latest/) can be used, such as `in 30 days`. (Default: `in 1 week`) | string | N |
31-
| `environment_ttl` | The period of time that a development environment should exist before being deleted. This is defined as a string with the default `in 1 week`. Other [relative dates](https://dateparser.readthedocs.io/en/latest/) can be used, such as `in 30 days`. (Default: `in 1 week`) | string | N |
32-
| `pinned_environments` | The list of development environments that are exempt from deletion due to expiration | list[string] | N |
33-
| `time_column_format` | The default format to use for all model time columns. This time format uses [python format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) (Default: `%Y-%m-%d`) | string | N |
34-
| `default_target_environment` | The name of the environment that will be the default target for the `sqlmesh plan` and `sqlmesh run` commands. (Default: `prod`) | string | N |
35-
| `physical_schema_override` | A mapping from model schema names to names of schemas in which physical tables for the corresponding models will be placed - [addition details](../guides/configuration.md#physical-schema-override). (Default physical schema name: `sqlmesh__[model schema]`) | string | N |
36-
| `environment_suffix_target` | Whether SQLMesh views should append their environment name to the `schema` or `table` - [additional details](../guides/configuration.md#view-schema-override). (Default: `schema`) | string | N |
37-
| `log_limit` | The default number of logs to keep (Default: `20`) | int | N |
28+
| Option | Description | Type | Required |
29+
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------:|
30+
| `snapshot_ttl` | The period of time that a model snapshot not a part of any environment should exist before being deleted. This is defined as a string with the default `in 1 week`. Other [relative dates](https://dateparser.readthedocs.io/en/latest/) can be used, such as `in 30 days`. (Default: `in 1 week`) | string | N |
31+
| `environment_ttl` | The period of time that a development environment should exist before being deleted. This is defined as a string with the default `in 1 week`. Other [relative dates](https://dateparser.readthedocs.io/en/latest/) can be used, such as `in 30 days`. (Default: `in 1 week`) | string | N |
32+
| `pinned_environments` | The list of development environments that are exempt from deletion due to expiration | list[string] | N |
33+
| `time_column_format` | The default format to use for all model time columns. This time format uses [python format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) (Default: `%Y-%m-%d`) | string | N |
34+
| `default_target_environment` | The name of the environment that will be the default target for the `sqlmesh plan` and `sqlmesh run` commands. (Default: `prod`) | string | N |
35+
| `physical_schema_override` | A mapping from model schema names to names of schemas in which physical tables for the corresponding models will be placed - [addition details](../guides/configuration.md#physical-schema-override). (Default physical schema name: `sqlmesh__[model schema]`) | string | N |
36+
| `environment_suffix_target` | Whether SQLMesh views should append their environment name to the `schema` or `table` - [additional details](../guides/configuration.md#view-schema-override). (Default: `schema`) | string | N |
37+
| `environment_catalog_mapping` | A mapping from regular expressions to catalog names. The catalog name is used to determine the target catalog for a given environment. | dict[string, string] | N |
38+
| `log_limit` | The default number of logs to keep (Default: `20`) | int | N |
3839

3940
### Model defaults
4041

docs/reference/model_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Configuration options for SQLMesh model properties. Supported by all model kinds
2323
| `end` | The date/time that determines the latest date interval that should be processed by a model. Can be a datetime string, epoch time in milliseconds, or a relative datetime such as `1 year ago`. | str \| int | N |
2424
| `grains` | The column(s) whose combination uniquely identifies each row in the model | str \| array[str] | N |
2525
| `references` | The model column(s) used to join to other models' grains | str \| array[str] | N |
26-
| `depends_on` | Models on which this model depends. (Default: dependencies inferred from model code) | array[str] | N |
26+
| `depends_on` | Models on which this model depends in addition to the ones inferred from the model's query. (Default: dependencies inferred from model code) | array[str] | N |
2727
| `storage_format` | The storage format that should be used to store physical tables; only applicable to engines such as Spark | str | N |
2828
| `partitioned_by` | The column(s) and/or column expressions used define a model's partitioning key. Required for the `INCREMENTAL_BY_PARTITION` model kind. Optional for all other model kinds; used to partition the model's physical table in engines that support partitioning. | str \| array[str] | N |
2929
| `clustered_by` | The column(s) used to cluster the model's physical table; only applicable to engines that support clustering | str | N |

sqlmesh/core/config/root.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class Config(BaseConfig):
6767
model_defaults: Default values for model definitions.
6868
physical_schema_override: A mapping from model schema names to names of schemas in which physical tables for corresponding models will be placed.
6969
environment_suffix_target: Indicates whether to append the environment name to the schema or table name.
70+
environment_catalog_mapping: A mapping from regular expressions to catalog names. The catalog name is used to determine the target catalog for a given environment.
7071
default_target_environment: The name of the environment that will be the default target for the `sqlmesh plan` and `sqlmesh run` commands.
7172
log_limit: The default number of logs to keep.
7273
format: The formatting options for SQL code.

0 commit comments

Comments
 (0)