sqlmesh.core.config.model
1from __future__ import annotations 2 3import typing as t 4 5from sqlmesh.core.config.base import BaseConfig 6from sqlmesh.core.model.kind import ModelKind, model_kind_validator 7from sqlmesh.utils.date import TimeLike 8 9 10class ModelDefaultsConfig(BaseConfig): 11 """A config object for default values applied to model definitions. 12 13 Args: 14 kind: The model kind. 15 dialect: The SQL dialect that the model's query is written in. 16 cron: A cron string specifying how often the model should be refreshed, leveraging the 17 [croniter](https://github.com/kiorky/croniter) library. 18 owner: The owner of the model. 19 start: The earliest date that the model will be backfilled for. If this is None, 20 then the date is inferred by taking the most recent start date of its ancestors. 21 The start date can be a static datetime or a relative datetime like "1 year ago" 22 storage_format: The storage format used to store the physical table, only applicable in certain engines. 23 (eg. 'parquet') 24 """ 25 26 kind: t.Optional[ModelKind] = None 27 dialect: t.Optional[str] = None 28 cron: t.Optional[str] = None 29 owner: t.Optional[str] = None 30 start: t.Optional[TimeLike] = None 31 storage_format: t.Optional[str] = None 32 33 _model_kind_validator = model_kind_validator
11class ModelDefaultsConfig(BaseConfig): 12 """A config object for default values applied to model definitions. 13 14 Args: 15 kind: The model kind. 16 dialect: The SQL dialect that the model's query is written in. 17 cron: A cron string specifying how often the model should be refreshed, leveraging the 18 [croniter](https://github.com/kiorky/croniter) library. 19 owner: The owner of the model. 20 start: The earliest date that the model will be backfilled for. If this is None, 21 then the date is inferred by taking the most recent start date of its ancestors. 22 The start date can be a static datetime or a relative datetime like "1 year ago" 23 storage_format: The storage format used to store the physical table, only applicable in certain engines. 24 (eg. 'parquet') 25 """ 26 27 kind: t.Optional[ModelKind] = None 28 dialect: t.Optional[str] = None 29 cron: t.Optional[str] = None 30 owner: t.Optional[str] = None 31 start: t.Optional[TimeLike] = None 32 storage_format: t.Optional[str] = None 33 34 _model_kind_validator = model_kind_validator
A config object for default values applied to model definitions.
Arguments:
- kind: The model kind.
- dialect: The SQL dialect that the model's query is written in.
- cron: A cron string specifying how often the model should be refreshed, leveraging the croniter library.
- owner: The owner of the model.
- start: The earliest date that the model will be backfilled for. If this is None, then the date is inferred by taking the most recent start date of its ancestors. The start date can be a static datetime or a relative datetime like "1 year ago"
- storage_format: The storage format used to store the physical table, only applicable in certain engines. (eg. 'parquet')
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- parse_file
- from_orm
- construct
- schema
- schema_json
- validate
- update_forward_refs