Deployment
you need to set up Flink Environment.
- InLong Sort file,
apache-inlong-[version]-bin.tar.gz
- Data Nodes Connectors, Download
apache-inlong-{version}-sort-connectors.tar.gz
Notice: Please put required Connectors jars into under FLINK_HOME/lib/
after download.
We can write following SQL script if we want to read data from MySQL and write into PostgreSQL.
CREATE TABLE `table_1`(
`age` INT,
`name` STRING)
WITH (
'username' = 'root',
'password' = 'inlong',
'database-name' = 'test',
'scan.incremental.snapshot.enabled' = 'false',
'server-time-zone' = 'GMT+8',
'table-name' = 'user'
);
CREATE TABLE `table_2`(
PRIMARY KEY (`name`) NOT ENFORCED,
`name` STRING,
'connector' = 'jdbc',
'url' = 'jdbc:postgresql://localhost:5432/postgres',
'username' = 'postgres',
'password' = 'inlong',
'table-name' = 'public.user',
'port' = '3306'
);
INSERT INTO `table_2`
SELECT
`name` AS `name`,