Comment on page
Fundamentally, there are two types of objects in Snowflake:
DATABASE, WAREHOUSE, ROLE, etc.
Account-level objects are normally described by single YAML file located in the root level of config directory.
For example, all warehouses are described in
TABLE, VIEW, FUNCTION, etc.
Schema-level objects are normally described by one YAML file per object located in sub-directories representing database and schema where object is located, as well as an object type.
- belongs to database
- belongs to schema
- it is a
- its name is
Some schema-level objects support overloading (FUNCTION, PROCEDURE). It means that you may have multiple objects of this type in the same schema and with the same name, but with different arguments. In this case you must include base data types of arguments in the name of YAML config file.
The following pages describe configuration format for each object type.
Every page starts with config path, followed by some examples, followed by detailed schema description, followed by usage notes and links.
Links always contain URL's to relevant Snowflake commands and to the code of specific YAML parser with JSON schema. You should be able to check all technical details using provided links.
Small number of properties are highlighted with red. Such properties are "required".
When you see data type
(ident)in schema description, it means this is the name of another object. For example, when one table refers to another using FOREIGN KEY.
For account-level objects, column names, parameter names - use name "as is".
For schema-level objects you may use fully-qualified names (
<database>.<schema>.<name>), but you may also use a short name (
<name>). It means that ref object is located in the same schema as current object.
This is very handy when you need to move some objects from one schema to another. There is no need to maintain fully qualified references all the time.
YAML format is a bit complicated. You may find some good external tutorials:
YAML data types are important for SnowDDL parsers, especially for account, session, copy parameters.
use_cached_results: true # this is bool
unsupported_ddl_action: fail # this is string
week_start: 1 # this is int
use_cached_results: "true" # this is now string
unsupported_ddl_action: false # this is now bool
week_start: "1" # this is now string
Incorrect data type will cause DDL query to fail. SnowDDL does not store "correct" data types for each parameter to make sure it will be compatible with any future changes.