SHOW NOTEBOOK PROJECTS¶
Lists the notebook projects (Snowflake NOTEBOOK objects) visible to the current role.
You can use this command to list objects in the current database and schema for the session, a specified database or schema, or your entire account.
The output includes the metadata and properties for each object. The objects are sorted lexicographically by database, schema, and object name (see Output in this topic for descriptions of the output columns). The order of rows in the results is important to note if you want to filter the results.
Syntax¶
SHOW NOTEBOOK PROJECTS;
SHOW NOTEBOOK PROJECTS IN SCHEMA <database_name>.<schema_name>;
SHOW NOTEBOOK PROJECTS IN DATABASE <database_name>;
SHOW NOTEBOOK PROJECTS IN ACCOUNT;
Parameters¶
IN SCHEMA <database_name>.<schema_name>Lists notebook projects in the specified schema.
IN DATABASE <database_name>Lists notebook projects in all schemas of the specified database.
IN ACCOUNTLists all notebook projects in the account that are visible to the current role.
Output¶
The output of the command includes the following columns, which describe the properties and metadata of the object:
Column |
Description |
|---|---|
|
Timestamp of creation. |
|
Name of the notebook project. |
|
Database containing the notebook project. |
|
Schema containing the notebook project. |
|
The role that owns the notebook project. |
|
Comment associated with the notebook project. |
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
Privilege |
Object |
Notes |
|---|---|---|
USAGE or OWNERSHIP |
Database |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
USAGE or OWNERSHIP |
Schema |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
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.
Usage notes¶
The command doesn’t require a running warehouse to execute.
The command only returns objects for which the current user’s current role has been granted at least one access privilege.
The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.
When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column
type, specifySELECT "type".You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
The command returns a maximum of ten thousand records for the specified object type, as dictated by the access privileges for the role used to execute the command. Any records above the ten thousand records limit aren’t returned, even with a filter applied.
To view results for which more than ten thousand records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
Returns all Snowflake
NOTEBOOKobjects visible to the current role.Use DESCRIBE NOTEBOOK or
GET_DDL('NOTEBOOK', ...)to inspect contents.Identifiers containing special characters must be double-quoted.
Examples¶
List all notebook projects visible to the current role:
SHOW NOTEBOOK PROJECTS;
List notebook projects in a specific schema:
SHOW NOTEBOOK PROJECTS IN SCHEMA TESTDB.TESTSCHEMA;
List notebook projects in a specific database:
SHOW NOTEBOOK PROJECTS IN DATABASE TESTDB;
List notebook projects in the account:
SHOW NOTEBOOK PROJECTS IN ACCOUNT;