Making CTK's MongoDB CDC relay work

Hi amotl again,

Hope you have a great week , I tried to use MongoDB Relay but it’s not working

export MONGODB_URL="mongodb://user:pass@host:port/collection/table?replicaSet=rs0&readPreference=secondary"
export MONGODB_URL_CTK="mongodb+cdc://user:pass@host:port/collection/table?replicaSet=rs0&readPreference=secondary"
export CRATEDB_CLUSTER_URL="crate://user:pass@host/collection/table?ssl=true"

ctk load table "${MONGODB_URL_CTK}" --cluster-url="${CRATEDB_CLUSTER_URL}"
NotImplementedError: Importing resource not implemented yet: mongodb+cdc://user:pass@host:port/collection/table?replicaSet=rs0&readPreference=secondary

ctk load table "${MONGODB_URL_CTK}"
NotImplementedError: Importing resource not implemented yet: mongodb+cdc://user:pass@host:port/collection/table?replicaSet=rs0&readPreference=secondary

I’m hosted both MongoDB and CrateDB on-premise :frowning:

Hi again,

This got fixed with v0.0.40, thanks a stack for the report!

With kind regards,
Andreas.

Hi amotl again ,

I tried update v0.0.41 and v0.0.40 and used again to use CDC Relay but it’s not work . I used ctk load table without CDC to copy data and it’s successfully . Please help me fix CDC error . Thanks you very much

$ ctk load table "mongodb://user:pass@host/collection/table" \
--cluster-url="crate://user:pass@host/db/table?ssl=true"
2025-08-21 07:20:27,031 [cratedb_toolkit.io.mongodb.api      ] INFO    : mongodb_copy. source=mongodb://user:pass@host/collection/table, target=crate://user:pass@host/db/table?ssl=true
2025-08-21 07:20:27,406 [cratedb_toolkit.io.mongodb.copy     ] INFO    : Starting MongoDBFullLoad. source=mongodb://user:pass@host/collection/table, target=crate://user:pass@host/db/table?ssl=true
2025-08-21 07:20:27,649 [cratedb_toolkit.io.mongodb.copy     ] INFO    : Source: MongoDB DatabaseAddress(uri=URL('mongodb://user:pass@host/collection/table')) count=2
2025-08-21 07:20:28,006 [cratedb_toolkit.io.mongodb.copy     ] INFO    : Target: CrateDB table=collection.table count=2
WRITE: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 11.21it/s]
2025-08-21 07:20:28,191 [cratedb_toolkit.io.mongodb.copy     ] INFO    : Bulk processor metrics: BulkMetrics(count_success_total=2, count_error_total=0, bytes_write_total=3080, bytes_error_total=0, rate_current=0, rate_max=0)
2025-08-21 07:20:28,192 [cratedb_toolkit.io.mongodb.copy     ] INFO    : Number of records written: success=2, error=0
$ ctk load table "${MONGODB_URL_CTK}"
2025-08-21 07:20:38,152 [cratedb_toolkit.io.mongodb.api      ] INFO    : Running MongoDB CDC relay
2025-08-21 07:20:38,153 [cratedb_toolkit.io.mongodb.cdc      ] INFO    : Initializing MongoDB CDC Relay. mongodb=mongodb://user:pass@host/collection/table, cratedb=crate://user:pass@host/db/table?ssl=true