数据湖探索 DLI-FileSystem源表:示例

时间:2024-12-11 08:41:28

示例

从obs表作为数据源读取数据,输出到print connector。

CREATE TABLE obs_source(
   name string,
   num INT,
   `file.path` STRING NOT NULL METADATA
) WITH (
   'connector' = 'filesystem',
   'path' = 'obs://demo/sink_parquent_obs',
   'format' = 'parquet',
   'source.monitor-interval'='1 h'
);


CREATE TABLE print (
   name string,
   num INT,
   path  STRING
) WITH (
   'connector' = 'print'
);

insert into print
select * from obs_source;
support.huaweicloud.com/sqlref-flink-dli/dli_08_15040.html