CREATE NOTEBOOK PROJECT

statementsupportedContainer services & dev tooling

docs.snowflake.com ↗

Object: NOTEBOOK PROJECT

Note Notebook Project Objects have been renamed to Code Bundles. The NOTEBOOK PROJECT grammar on this page continues to work. For the current command and its new capabilities, see CREATE CODE BUNDLE and Snowflake Code Bundles. Creates a notebook project object. A notebook project object (NPO) links a Snowsight workspace to a database and schema. When the NPO is created, all files from the workspace are copied into the project in the specified database and schema. The notebook project can then be executed using EXECUTE NOTEBOOK PROJECT. You can create a notebook project object from an internal or temporary stage, a private workspace, or a shared workspace. External stages aren’t supported.

Syntax

supportedpartialnot supportednot scored

Create a notebook project object from a private workspace

CREATE NOTEBOOK PROJECT <database_name>.<schema_name>.<project_name>
  FROM 'snow://workspace/<workspace_path>'
  [ COMMENT = '<string_literal>' ];

Create a notebook project object from a stage

CREATE NOTEBOOK PROJECT [ IF NOT EXISTS ] <database_name>.<schema_name>.<project_name>
  FROM '@<database_name>.<schema_name>.<stage_name>'
  [ COMMENT = '<string_literal>' ];

Parameters

NameRequiredDescription
database_name.schema_name.project_namerequiredFully qualified identifier for the notebook project. The project name must be unique within the schema. Identifiers must start with an alphabetic character and cannot contain spaces or special characters unless the identifier is enclosed in double quotes (for example, "My Project"). Identifiers in double quotes are case-sensitive.
FROM { 'snow://workspace/workspace_path' | '@database_name.schema_name.stage_name' }requiredSpecifies the source that backs this notebook project. Use a snow://workspace/... URL to create the notebook project from a workspace version in Snowsight. Use a stage reference (for example, '@my_db.my_schema.my_stage') to create the notebook project from notebook files that you have deployed to an internal or temporary stage. When creating from a workspace, the value must be a snow://workspace/... URL pointing to a workspace version. The path typically includes: USER$ or another owner. Schema. Workspace name. Version (for example, versions/last). For example: snow://workspace/USER$.MY_SCHEMA."my_notebook_workspace"/versions/last
COMMENT = 'string_literal'optionalAdds a comment or description to the notebook project object. Use comments to describe the purpose or workflow (for example, COMMENT = 'Notebook project for this workflow'). Comments are stored as object metadata; avoid including sensitive data in comments.

Usage notes

Access control requirements

To execute CREATE NOTEBOOK PROJECT, a role must have sufficient privileges to create objects in the target database and schema. Required privileges include: - USAGE or OWNERSHIP on the database. - USAGE or OWNERSHIP on the schema. - CREATE NOTEBOOK PROJECT on the schema that allows creating objects within that schema. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

See also

Referenced by