Im trying to use the `flink-sql-connector-mongodb-...
# troubleshooting
j
Im trying to use the
flink-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:
Copy code
.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.
I was able to get the changeStream working using the table api, not the streams api. It works, I
toChangeStream
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:
Copy code
DataStream<Row> cdcStream = tableEnv.toChangelogStream(results);
and resorted to:
Copy code
cdcStream.map(new ManualRowToMyJavaObject());
Any tips on using the a Row Deserializer to handle this more natively?