创建一张外表。外表是用来将Lindorm流引擎与Lindorm宽表或者时序表进行关联。创建外表不需要声明有哪些列,当需要列的Schema信息时,系统会实时读取被关联的Lindorm宽表或者时序表的源数据,从而保持源数据的一致性。
语法
CREATE EXTERNAL TABLE (IF NOT EXISTS) table_name
(WITH tableProperties)
tableProperties
: '(' tableProperty (',' tableProperty)* ')'
;
tableProperty
: identifier EQ expression
;
参数说明
参数 | 是否必选 | 说明 |
table_name | 是 | 外表的名称。 |
tablePropertys | 是 | 将Lindorm流引擎与Lindorm宽表或者时序表进行关联,需要配置以下参数:
|
示例
CREATE EXTERNAL TABLE IF NOT EXISTS user_external
WITH (
`table_type` = 'lindorm.table',
`table_name` = 'test',
`endpoint` = 'ld-bp17pwu1541ia****-proxy-lindorm.lindorm.rds.aliyuncs.com:30020'
);
反馈
- 本页导读 (1)
文档反馈