snow helpers generate-project-schema¶
Generate a JSON Schema for the Snowflake CLI project definition file (snowflake.yml).
Syntax¶
Arguments¶
None
Options¶
--definition-version [1|1.1|2]Project definition version to generate the schema for. Default: ProjectDefinitionVersion.V2.
--output-file, -o FILEWrite the JSON Schema to this file. When omitted, schema is printed to stdout.
--format [TABLE|JSON|JSON_EXT|CSV]Specifies the output format. [env var: SNOWFLAKE_CLI_OUTPUT_FORMAT | config: cli.output_format]. Default: TABLE.
--verbose, -vDisplays log entries for log levels
infoand higher. Default: False.--debugDisplays log entries for log levels
debugand higher; debug logs contain additional information. Default: False.--silentTurns off intermediate output to console. Default: False.
--enhanced-exit-codesDifferentiate exit error codes based on failure type. Default: False.
--decimal-precision INTEGERNumber of decimal places to display for decimal values. Uses Python’s default precision if not specified. [env var: SNOWFLAKE_DECIMAL_PRECISION].
--helpDisplays the help text for this command.
Usage notes¶
The generated schema describes the structure of the snowflake.yml project definition file for the selected definition version. Use the --definition-version option to choose the version (1, 1.1, or 2; the default is 2), and the --output-file (or -o) option to write the schema to a file instead of printing it to standard output.
Because the schema is derived from the CLI’s own models, it validates the structure of the file, for example unknown keys, incorrect types, and missing required fields. Some cross-field and semantic checks are applied only when the project is loaded or deployed, so a file that matches the schema can still fail at deploy time.
Examples¶
-
Print the schema for the default (version 2) project definition to standard output:
-
Write the schema to a file that your editor or CI pipeline can reference:
-
Generate the schema for a version 1.1 project definition: