snowpark init

Initializes this directory with a sample set of files for creating a Snowpark project.

Syntax

snow snowpark init
  <project_name>
  --format <format>
  --verbose
  --debug
  --silent
Copy

Arguments

project_name [PROJECT_NAME]

Name of the snowpark project you want to create.

Options

--format [TABLE|JSON]

Specifies the output format.

--verbose, -v

Displays log entries for log levels info and higher.

--debug

Displays log entries for log levels debug and higher; debug logs contains additional information.

--silent

Turns off intermediate output to console.

--help

Displays the help text for this command.

Usage notes

  • <project_name> can be either a name or an absolute path.

    • If you don’t specify <project_name>, the command creates the creates a project directory named example_snowpark and initializes the project in that directory.

    • If you specify <project_name> as a name, the command creates the creates a project directory with the specified name inside the current directory and initializes the project in that directory.

    • If you specify <project_name> as an absolute path, the command creates the creates the specified directory and initializes the project in that directory. If the parent directory in the path does not exist, the command displays an error.

  • It copies the project template from the snowflakedb/snowflake-cli git repo.

Examples

  • Initialize a project with no <project_name>:

    snow snowpark init
    
    Copy
    Initialized the new project in example_snowpark/
    
  • Initialize a named project in the current directory:

    snow snowpark init my_new_project
    
    Copy
    Initialized the new project in my_new_project/
    
  • Initialize a project using an absolute path:

    snow snowpark init ~/my_projects/new_snowpark
    
    Copy
    Initialized the new project in ~/my_projects/new_snowpark