Harish Sharma
08/18/2025, 7:15 AMJdbcIncrementalSource<String> pgSource =
PostgresSourceBuilder.PostgresIncrementalSource.<String>builder()
.hostname("localhost")
.port(5432)
.database("postgres")
.schemaList("public")
.tableList("public.orders")
.username("postgres")
.password("postgres")
.slotName("orders_slot")
.decodingPluginName("pgoutput")
// optional: chunk key if no PK; see docs
//.chunkKeyColumn("id")
.deserializer(deserializer)
.build();
DataStreamSource<String> stream =
env.fromSource(pgSource, WatermarkStrategy.noWatermarks(), "pg-cdc-incremental");
stream.print();
env.execute();