Update hive external table en sql reference
This commit is contained in:
@ -35,7 +35,7 @@ Syntax:
|
||||
CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [database.]table_name
|
||||
(column_definition1[, column_definition2, ...]
|
||||
[, index_definition1[, ndex_definition12,]])
|
||||
[ENGINE = [olap|mysql|broker]]
|
||||
[ENGINE = [olap|mysql|broker|hive]]
|
||||
[key_desc]
|
||||
[COMMENT "table comment"]
|
||||
[partition_desc]
|
||||
@ -104,7 +104,7 @@ Syntax:
|
||||
Notice:
|
||||
Only support BITMAP index in current version, BITMAP can only apply to single column
|
||||
3. ENGINE type
|
||||
Default is olap. Options are: olap, mysql, broker
|
||||
Default is olap. Options are: olap, mysql, broker, hive
|
||||
1) For mysql, properties should include:
|
||||
|
||||
```
|
||||
@ -123,7 +123,7 @@ Syntax:
|
||||
table_name in CREATE TABLE stmt is table is Doris. They can be different or same.
|
||||
MySQL table created in Doris is for accessing data in MySQL database.
|
||||
Doris does not maintain and store any data from MySQL table.
|
||||
1) For broker, properties should include:
|
||||
2) For broker, properties should include:
|
||||
|
||||
```
|
||||
PROPERTIES (
|
||||
@ -145,6 +145,16 @@ Syntax:
|
||||
Notice:
|
||||
Files name in "path" is separated by ",". If file name includes ",", use "%2c" instead. If file name includes "%", use "%25" instead.
|
||||
Support CSV and Parquet. Support GZ, BZ2, LZ4, LZO(LZOP)
|
||||
3) For hive, properties should include:
|
||||
```
|
||||
PROPERTIES (
|
||||
"database" = "hive_db_name",
|
||||
"table" = "hive_table_name",
|
||||
"hive.metastore.uris" = "thrift://127.0.0.1:9083"
|
||||
)
|
||||
```
|
||||
"database" is the name of the database corresponding to the hive table, "table" is the name of the hive table, and "hive.metastore.uris" is the hive metastore service address.
|
||||
Notice: At present, hive external tables are only used for Spark Load and query is not supported.
|
||||
4. key_desc
|
||||
Syntax:
|
||||
key_type(k1[,k2 ...])
|
||||
@ -577,6 +587,23 @@ Syntax:
|
||||
PROPERTIES ("in_memory"="true");
|
||||
```
|
||||
|
||||
13. Create a hive external table
|
||||
```
|
||||
CREATE TABLE example_db.table_hive
|
||||
(
|
||||
k1 TINYINT,
|
||||
k2 VARCHAR(50),
|
||||
v INT
|
||||
)
|
||||
ENGINE=hive
|
||||
PROPERTIES
|
||||
(
|
||||
"database" = "hive_db_name",
|
||||
"table" = "hive_table_name",
|
||||
"hive.metastore.uris" = "thrift://127.0.0.1:9083"
|
||||
);
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
CREATE,TABLE
|
||||
|
||||
@ -111,7 +111,7 @@ under the License.
|
||||
当前仅支持BITMAP索引, BITMAP索引仅支持应用于单列
|
||||
|
||||
3. ENGINE 类型
|
||||
默认为 olap。可选 mysql, broker
|
||||
默认为 olap。可选 mysql, broker, hive
|
||||
1) 如果是 mysql,则需要在 properties 提供以下信息:
|
||||
|
||||
```
|
||||
@ -626,7 +626,7 @@ under the License.
|
||||
(
|
||||
k1 TINYINT,
|
||||
k2 VARCHAR(50),
|
||||
v2 INT
|
||||
v INT
|
||||
)
|
||||
ENGINE=hive
|
||||
PROPERTIES
|
||||
|
||||
Reference in New Issue
Block a user