自学内容网 自学内容网

spark3 flink1.19 配置paimon0.9 jdbc metastore

flink

(base) thomas990p@thomas990p bin % cat sql-client-paimon-streaming-mode.sh 

sql-client.sh -i paimon-catalog-streaming.sql

(base) thomas990p@thomas990p bin % cat paimon-catalog-streaming.sql

CREATE CATALOG my_catalog WITH (

    'type'='paimon',

    'warehouse'='file:/Users/thomas990p/data/paimon',

  'lock.enabled' = 'true',

  'metastore' = 'jdbc',

  'uri' = 'jdbc:mysql://localhost:3306/default?user=root&password=123123123'

 -- 'uri' = 'jdbc:sqlite:/Users/thomas990p/database/sqlite_test1.db'

);

USE CATALOG my_catalog;

SET 'sql-client.execution.result-mode' = 'tableau';

SET 'execution.runtime-mode' = 'streaming';

spark

注意uri加引号:

spark-sql -i paimon.sql \

    --conf spark.sql.catalog.paimon=org.apache.paimon.spark.SparkCatalog \

    --conf spark.sql.catalog.paimon.warehouse=file:/Users/thomas990p/data/paimon \

    --conf spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions \

    --conf spark.sql.catalog.paimon.lock.enable=true \

    --conf spark.sql.catalog.paimon.metastore=jdbc \

    --conf spark.sql.catalog.paimon.uri='jdbc:mysql://localhost:3306/default?user=root&password=123123123'

(base) thomas990p@thomas990p bin % cat paimon.sql 

use paimon;


原文地址:https://blog.csdn.net/qq_35515661/article/details/140299575

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!