CREATE SCHEMA
Function
CREATE SCHEMA is specific to DataArts Fabric SQL. It is used to create a database with a specified name on LakeFormation.
Precautions
DataArts Fabric SQL does not have the cluster concept and does not store any metadata. All metadata is stored in LakeFormation. Therefore, after creating an external schema, you can log in to the LakeFormation console to view the created metadata.
Syntax
1
|
CREATE SCHEMA [ IF NOT EXISTS ] schema_name [ WITH LOCATION path ]; |
Parameter Description
- schema_name
Database name of the target table.
- WITH LOCATION path
(Optional) Database storage directory. If no database directory is specified by the user, the system will automatically use the database directory with the same name as the storage directory of the database in the catalog directory.
- path
Path for storing database files. When creating a schema, ensure that the target path does not contain other files.
Examples
Create a database directory.
1
|
CREATE SCHEMA test_schema; |
Create a database directory and specify a storage directory for the database.
1
|
CREATE SCHEMA test_schema WITH LOCATION 'obs://xxxxx/yyyy/'; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot