Shubham Jain
04/28/2024, 3:31 PMflink-shaded-hadoop-2-uber-2.7.5-10.0.jar
flink-sql-connector-postgres-cdc-3.0.0.jar
iceberg-flink-runtime-1.16-1.3.1.jar
Tables
CREATE TABLE bookings_source (
`book_ref` STRING,
`book_date` TIMESTAMP,
`total_amount` DECIMAL(20, 0),
PRIMARY KEY (`book_ref`) NOT ENFORCED
) WITH (
'connector' = 'postgres-cdc',
'hostname' = 'postgres',
'port' = '5432',
'username' = 'postgres',
'password' = 'postgres',
'database-name' = 'demo',
'table-name' = 'bookings',
'schema-name' = 'bookings',
'slot.name' = 'flink'
);
CREATE CATALOG iceberg_catalog WITH (
'type'='iceberg',
'catalog-type'='hadoop',
'warehouse'='file:///tmp/iceberg/warehouse/'
);
CREATE TABLE bookings_sink (
`book_ref` STRING,
`book_date` TIMESTAMP,
`total_amount` DECIMAL(20, 0),
PRIMARY KEY (`book_ref`) NOT ENFORCED
) WITH (
'connector'='iceberg',
'catalog-name'='iceberg_catalog',
'catalog-type'='hadoop',
'warehouse'='file:///tmp/iceberg/warehouse/',
'format-version'='2'
);
INSERT INTO bookings_sink select * from bookings_source;Shubham Jain
04/28/2024, 3:32 PMflink-gs-fs-hadoop-1.16.0.jar in plugins directly and updated warehouse setting in sink and catalog configuration but it gives me this error
[ERROR] Could not execute SQL statement. Reason:
java.io.IOException: No FileSystem for scheme: gsAleksandr Pilipenko
04/28/2024, 4:30 PMmy iceberg table sink is not getting updated at all and don’t see any errors in jobmanager or taskmanager.Do you have checkpoints enabled and can you see completed checkpoints in Flink dashboard?
I tried placingHave you placed it atin plugins directly and updated warehouse setting in sink and catalog configuration but it gives me this errorflink-gs-fs-hadoop-1.16.0.jar
<flink path>/plugins/flink-gs-fs-hadoop-1.16.0.jar or similar to <flink path>/plugins/flink-gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jar?Shubham Jain
04/28/2024, 4:36 PMDo you have checkpoints enabled and can you see completed checkpoints in Flink dashboard?I don't have checkpoints enabled. I tried now using below command but seems didn't work.
SET 'state.checkpoints.dir' = 'file:////tmp/';
SET 'execution.checkpointing.mode' = 'EXACTLY_ONCE';
SET 'execution.checkpointing.interval' = '30sec';
SET 'execution.checkpointing.prefer-checkpoint-for-recovery' = 'true';
Have you placed it atYes and it isor similar to<flink path>/plugins/flink-gs-fs-hadoop-1.16.0.jar?<flink path>/plugins/flink-gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jar
/opt/flink/plugins/gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jarAleksandr Pilipenko
04/28/2024, 4:39 PMI don’t have checkpoints enabled.Iceberg writes data only during checkpointing. So in order to write data to your destination ensure that checkpoints are enabled.