Files
doris/docs/zh-CN/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-DATABASE.md
Mingyu Chen 74a482ca7f [fix] fix docs build bug (#9293)
After this PR #9272, the `docs/build_help_zip.sh` will run failed.
This PR fix this issue.
But the help module still has some parse problem, I will fix it in next PR.

This CL mainly changes:
1. fix `docs/build_help_zip.sh` error
2. remove `sql-reference-v2` to `sql-reference`
3. modify build extension github action to run `docs/build_help_zip.sh`
2022-04-28 22:19:04 +08:00

2.0 KiB

title, language
title language
CREATE-DATABASE zh-CN

CREATE-DATABASE

Name

CREATE DATABASE

Description

该语句用于新建数据库(database)

语法:

CREATE DATABASE [IF NOT EXISTS] db_name
    [PROPERTIES ("key"="value", ...)];

PROPERTIES 该数据库的附加信息,可以缺省。

  • 如果创建 Iceberg 数据库,则需要在 properties 中提供以下信息:

    PROPERTIES (
      "iceberg.database" = "iceberg_db_name",
      "iceberg.hive.metastore.uris" = "thrift://127.0.0.1:9083",
      "iceberg.catalog.type" = "HIVE_CATALOG"
    )
    

    参数说明:

    • ceberg.database :Iceberg 对应的库名;
    • iceberg.hive.metastore.uris :hive metastore 服务地址;
    • iceberg.catalog.type: 默认为 HIVE_CATALOG;当前仅支持 HIVE_CATALOG,后续会支持更多 Iceberg catalog 类型。

Example

  1. 新建数据库 db_test

    CREATE DATABASE db_test;
    
  2. 新建 Iceberg 数据库 iceberg_test

    CREATE DATABASE `iceberg_test`
    PROPERTIES (
    	"iceberg.database" = "doris",
    	"iceberg.hive.metastore.uris" = "thrift://127.0.0.1:9083",
    	"iceberg.catalog.type" = "HIVE_CATALOG"
    );
    

Keywords

CREATE, DATABASE

Best Practice