Disabling CDC in MongoDBv2 source for date-time based sync

Summary

How to disable CDC in MongoDBv2 source for syncing based on a specific date-time value?


Question

i have to disable cdc from source-mongodbv2 because i have to sync based on some date time value only? how to do this any suggestion?



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["disable-cdc", "mongodbv2-connector", "sync", "date-time"]

As a workaround so that the field can added in the query itself :

i have added start date field and start date text field in spec.json. also i have added
added get for these two in MongoDbSourceCpnfig.java

then i have added this in MongoDbInitialLoadRecordIterator.java

System.out.println("start field is: " + config.getStartField() + " start date sync is : " + config.getStartDate());
filters.add(Filters.gte(Objects.requireNonNull(config.getStartField()), Objects.requireNonNull(config.getStartDate())));```

but facing issue that once ithe va;ue comes as null and twice the value comes as expected so throws NPE.