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.

    1. CREATE TABLE `table_1`(
    2. `age` INT,
    3. `name` STRING)
    4. WITH (
    5. 'username' = 'root',
    6. 'password' = 'inlong',
    7. 'database-name' = 'test',
    8. 'scan.incremental.snapshot.enabled' = 'false',
    9. 'server-time-zone' = 'GMT+8',
    10. 'table-name' = 'user'
    11. );
    12. CREATE TABLE `table_2`(
    13. PRIMARY KEY (`name`) NOT ENFORCED,
    14. `name` STRING,
    15. 'connector' = 'jdbc',
    16. 'url' = 'jdbc:postgresql://localhost:5432/postgres',
    17. 'username' = 'postgres',
    18. 'password' = 'inlong',
    19. 'table-name' = 'public.user',
    20. 'port' = '3306'
    21. );
    22. INSERT INTO `table_2`
    23. SELECT
    24. `name` AS `name`,