flink sql clint init.sql 初始化sql

SET sql-client.execution.result-mode=tableau;
load module hive;

CREATE CATALOG my_jdbc_catalog WITH(
'type' = 'jdbc',
'default-database' = 'xx',
'username' = 'xx',
'password' = 'xx',
'base-url' = 'jdbc:mysql://xx:3306'
);

CREATE CATALOG myhive WITH (
'type' = 'hive',
'default-database' = 'default',
'hive-conf-dir' = '/opt/module/hive/conf'
);

use catalog myhive;

--SET table.sql-dialect=hive; -- 使用hive语法,在flink sql中
-- SET table.sql-dialect=default;

posted @ 2024-09-23 08:35  自在现实  阅读(44)  评论(0)    收藏  举报