CREATE DATASET¶
Creates a new dataset in the current schema or the schema that you specify.
- See also:
ALTER DATASET , ALTER DATASET … ADD VERSION , ALTER DATASET … DROP VERSION, SHOW DATASETS
Syntax¶
CREATE [ OR REPLACE ] [ IF NOT EXISTS ] DATASET <name>
Required parameters¶
name
The name of the dataset that you’re creating within the current schema or a schema that you specify.
Access control requirements¶
Privilege |
Object |
Notes |
---|---|---|
CREATE DATASET |
Schema |
Only provides the privilege to create a dataset. You must also have the USAGE privilege on the schema. |
Usage notes¶
Regarding metadata:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.
Examples¶
The following example creates a dataset called my_dataset
:
CREATE DATASET my_dataset;
The following example creates or replaces a dataset called my_dataset
:
CREATE OR REPLACE DATASET my_dataset;