Skip to main content

CREATE SPACE

Create a new space.

You can create a top-level entity using CREATE SPACE, and use CREATE FOLDER to create subfolders inside the space by qualifying the folder name with the space name (for example, my_space.my_folder).

Syntax
CREATE SPACE [ IF NOT EXISTS ] <space_name>

Parameters

[ IF NOT EXISTS ] Optional

When included, the command runs even if the space exists and the results indicate that the space already exists. If this clause is not specified, the command fails if the space already exists.


<space_name> String

The name of the space that you are creating. The name cannot contain a period (.), a double quote ("), or an @ character.


Examples

Create a space
CREATE SPACE my_space
Create a space if it doesn't exist
CREATE SPACE IF NOT EXISTS my_space
Create a space and add nested folders inside it
CREATE SPACE IF NOT EXISTS StrategicMaterialsDB;
CREATE FOLDER IF NOT EXISTS StrategicMaterialsDB.Sourcing;
CREATE FOLDER IF NOT EXISTS StrategicMaterialsDB.Sourcing.Bronze;