Skip to main content
版本:Next

总览

简介

Load 节点列表是一组基于 Apache Flink® 的 Sink Connectors 用于将数据加载到不同的存储系统。

支持的 Load 节点列表

Load 节点版本驱动包
KafkaKafka: 0.10+None
HBaseHbase: 2.2.xNone
PostgreSQLPostgreSQL: 9.6, 10, 11, 12JDBC Driver: 42.2.12
OracleOracle: 11, 12, 19Oracle Driver: 19.3.0.0
MySQLMySQL: 5.6, 5.7, 8.0.x
RDS MySQL: 5.6, 5.7, 8.0.x
PolarDB MySQL: 5.6, 5.7, 8.0.x
Aurora MySQL: 5.6, 5.7, 8.0.x
MariaDB: 10.x
PolarDB X: 2.0.1
JDBC Driver: 8.0.21
TDSQL-PostgreSQLTDSQL-PostgreSQL: 10.17JDBC Driver: 42.2.12
GreenplumGreenplum: 4.x, 5.x, 6.xJDBC Driver: 42.2.12
ElasticsearchElasticsearch: 6.x, 7.xNone
ClickHouseClickHouse: 20.7+JDBC Driver: 0.3.1
HiveHive: 1.x, 2.x, 3.xNone
SQLServerSQLServer: 2012, 2014, 2016, 2017, 2019JDBC Driver: 7.2.2.jre8
HDFSHDFS: 2.x, 3.xNone
IcebergIceberg: 0.13.1+None
HudiHudi: 0.12.xNone

下表展示了 InLong® Load 节点 和 Flink® 版本之间的对应关系。

InLong® Load 节点版本Flink® 版本
1.2.01.13.5

SQL API 的用法

下面例子展示了如何在 Flink SQL Client 创建一个 MySQL Load 节点并加载数据进去:

-- 创建一个 MySQL Extract 节点
CREATE TABLE mysql_extract_node (
id INT NOT NULL,
name STRING,
age INT,
weight DECIMAL(10,3),
PRIMARY KEY(id) NOT ENFORCED
) WITH (
'connector' = 'mysql-cdc-inlong',
'hostname' = 'YourHostname',
'port' = '3306',
'username' = 'YourUsername',
'password' = 'YourPassword',
'database-name' = 'YourDatabaseName',
'table-name' = 'YourTableName'
);
-- 创建一个 MySQL Load 节点
CREATE TABLE mysql_load_node (
id INT NOT NULL,
name STRING,
age INT,
weight DECIMAL(10,3),
PRIMARY KEY(id) NOT ENFORCED
) WITH (
'connector' = 'jdbc-inlong',
'url' = 'jdbc:mysql://YourHostname:3306/YourDatabaseName',
'username' = 'YourUsername',
'password' = 'YourPassword',
'table-name' = 'YourTableName'
);

INSERT INTO mysql_load_node SELECT id, name, age, weight FROM mysql_extract_node;