Skip to content

Commit 366f3fe

Browse files
committed
Update docs
1 parent c194506 commit 366f3fe

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

docs/reference/configuration.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,44 @@ This section describes the other root level configuration parameters.
1616

1717
Configuration options for SQLMesh project directories.
1818

19-
| Option | Description | Type | Required |
20-
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | :----------: | :------: |
21-
| `ignore_patterns` | Files that match glob patterns specified in this list are ignored when scanning the project folder (Default: `[]`) | list[string] | N |
22-
| `project` | The project name of this config. Used for [multi-repo setups](../guides/multi_repo.md). | string | N |
19+
| Option | Description | Type | Required |
20+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------- | :----------: | :------: |
21+
| `ignore_patterns` | Files that match glob patterns specified in this list are ignored when scanning the project folder (Default: `[]`) | list[string] | N |
22+
| `project` | The project name of this config. Used for [multi-repo setups](../guides/multi_repo.md). | string | N |
2323
| `cache_dir` | The directory to store the SQLMesh cache. Can be an absolute path or relative to the project directory. (Default: `.cache`) | string | N |
24+
| `log_limit` | The default number of historical log files to keep (Default: `20`) | int | N |
2425

25-
### Environments
26+
### Database (Physical Layer)
2627

27-
Configuration options for SQLMesh environment creation and promotion.
28+
Configuration options for how SQLMesh manages database objects in the [physical layer](../concepts/glossary.md#physical-layer).
2829

2930
| Option | Description | Type | Required |
3031
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------:|
3132
| `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 |
33+
| `physical_schema_override` | (Deprecated) Use `physical_schema_mapping` instead. A mapping from model schema names to names of schemas in which physical tables for the corresponding models will be placed. | dict[string, string] | N |
34+
| `physical_schema_mapping` | A mapping from regular expressions to names of schemas in which physical tables for the corresponding models [will be placed](../guides/configuration.md#physical-table-schemas). (Default physical schema name: `sqlmesh__[model schema]`) | dict[string, string] | N |
35+
| `physical_table_naming_convention`| Sets which parts of the model name are included in the physical table names. Options are `schema_and_table`, `table_only` or `hash_md5` - [additional details](../guides/configuration.md#physical-table-naming-convention). (Default: `schema_and_table`) | string | N |
36+
37+
### Environments (Virtual Layer)
38+
39+
Configuration options for how SQLMesh manages environment creation and promotion in the [virtual layer](../concepts/glossary.md#virtual-layer).
40+
41+
| Option | Description | Type | Required |
42+
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------:|
3243
| `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 |
3344
| `pinned_environments` | The list of development environments that are exempt from deletion due to expiration | list[string] | N |
34-
| `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 |
3545
| `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 |
36-
| `physical_schema_override` | (Deprecated) Use `physical_schema_mapping` instead. A mapping from model schema names to names of schemas in which physical tables for the corresponding models will be placed. | dict[string, string] | N |
37-
| `physical_schema_mapping` | A mapping from regular expressions to names of schemas in which physical tables for the corresponding models [will be placed](../guides/configuration.md#physical-table-schemas). (Default physical schema name: `sqlmesh__[model schema]`) | dict[string, string] | N |
38-
| `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 |
39-
| `physical_table_naming_convention`| Sets which parts of the model name are included in the physical table names. Options are `schema_and_table` or `table_only` - [additional details](../guides/configuration.md#physical-table-naming-convention). (Default: `schema_and_table`) | string | N |
46+
| `environment_suffix_target` | Whether SQLMesh views should append their environment name to the `schema`, `table` or `catalog` - [additional details](../guides/configuration.md#view-schema-override). (Default: `schema`) | string | N |
4047
| `gateway_managed_virtual_layer` | Whether SQLMesh views of the virtual layer will be created by the default gateway or model specified gateways - [additional details](../guides/multi_engine.md#gateway-managed-virtual-layer). (Default: False) | boolean | N |
41-
| `infer_python_dependencies` | Whether SQLMesh will statically analyze Python code to automatically infer Python package requirements. (Default: True) | boolean | N |
4248
| `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 |
43-
| `log_limit` | The default number of logs to keep (Default: `20`) | int | N |
4449

45-
### Model defaults
50+
### Models
51+
52+
| Option | Description | Type | Required |
53+
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------:|:--------:|
54+
| `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 |
55+
| `infer_python_dependencies` | Whether SQLMesh will statically analyze Python code to automatically infer Python package requirements. (Default: True) | boolean | N |
56+
| `model_defaults` | Default [properties](./model_configuration.md#model-defaults) to set on each model. At a minimum, `dialect` must be set. | dict[string, any] | Y |
4657

4758
The `model_defaults` key is **required** and must contain a value for the `dialect` key.
4859

@@ -83,6 +94,7 @@ Configuration for the `sqlmesh plan` command.
8394
| `no_diff` | Don't show diffs for changed models (Default: False) | boolean | N |
8495
| `no_prompts` | Disables interactive prompts in CLI (Default: True) | boolean | N |
8596
| `always_recreate_environment` | Always recreates the target environment from the environment specified in `create_from` (by default `prod`) (Default: False) | boolean | N |
97+
8698
## Run
8799

88100
Configuration for the `sqlmesh run` command. Please note that this is only applicable when configured with the [builtin](#builtin) scheduler.

0 commit comments

Comments
 (0)