Justin Mason
04/15/2025, 11:28 PMflink-sql-connector-mongodb-cdc 3.3.0
I'm using MongoDB 7.0.19
I am following the exact guide from https://nightlies.apache.org/flink/flink-cdc-docs-release-3.3/docs/connectors/flink-sources/mongodb-cdc/#datastream-source
I can get the initial changeStream for the collection, and even explicitly set the StartupOptions:
.startupOptions(StartupOptions.initial())
I am not getting incremental changes though. Updates to the MongoDB collection don't trigger new Change Stream Events.
I tried this on 4.4.24 too.Justin Mason
04/18/2025, 2:58 PMtoChangeStream the cdc table and manually map that to an underling java type. This type has jsonProperty attributes but I couldn't figure out how to deserialize from the Row record type to the java type like I can using the standard json ObjectMapper.
I have:
DataStream<Row> cdcStream = tableEnv.toChangelogStream(results);
and resorted to:
cdcStream.map(new ManualRowToMyJavaObject());
Any tips on using the a Row Deserializer to handle this more natively?