Configuration¶
This section describes how to customize the behavior of the snowman
command.
The configuration written in snowman.toml
or [tool.snowman]
of pyproject.toml
are loaded.
Instructions by command arguments have higher priority than the configuration file, and it is possible to override the configuration specified in the configuration file.
connection
¶
Set the connection information to Snowflake. Each setting item can be specified directly from the configuration file, or you can specify the environment variable name in the env
property to get the value from the environment variable.
Example
model
¶
output_dir
¶
Specify the output directory of the Pydantic models generated from the Snowflake information schema.
table_types
¶
Specify the table types that are the target of model generation.
The default value is ["BASE TABLE", "VIEW"]
Example
include_databases
¶
Specify the database names that are the target of model generation. It cannot be used in conjunction with [model.exclude_databases]
.
exclude_datebases
¶
Specify the database names that are not the target of model generation. It cannot be used in conjunction with [model.include_databases]
.
include_schemas
¶
Specify the schema names that are the target of model generation. It cannot be used in conjunction with [model.database.*.exclude_schemas]
.
exclude_schemas
¶
Specify the schema names that are not the target of model generation. It cannot be used in conjunction with [model.database.*.include_schemas]
.
pydantic
¶
Configure the Pydantic models to be generated.
model_name_prefix
¶
Specify the prefix of the Pydantic model name.
Example
The following conversion is performed:
database.schema.user
-> database.schema.ModelUser
model_name_suffix
¶
Specify the suffix of the Pydantic model name.