CREATE EXPERIMENT¶
Creates a new experiment or replaces an existing experiment.
- See also:
 ALTER EXPERIMENT , SHOW EXPERIMENTS , DROP EXPERIMENT , SHOW RUNS IN EXPERIMENT , SHOW RUN … IN EXPERIMENT
Syntax¶
CREATE [ OR REPLACE ] EXPERIMENT [ IF NOT EXISTS ] <name>
Required parameters¶
nameString that specifies the identifier (i.e. name) for the experiment; must be unique for the schema in which the experiment is created.
In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example,
"My object"). Identifiers enclosed in double quotes are also case-sensitive.For more information, see Identifier requirements.
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
Privilege  | 
Object  | 
Notes  | 
|---|---|---|
CREATE EXPERIMENT  | 
Schema  | 
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on 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.
Usage notes¶
The OR REPLACE and IF NOT EXISTS clauses are mutually exclusive. They can’t both be used in the same statement.
CREATE OR REPLACE <object> statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.