# Using CrateDB Toolkit to sync MongoDB with CrateDB

**URL:** <https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062>\
**Category:** CrateDB\
**Tags:** integration\
**Created:** [August 11, 2025, 10:05am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062 "2025-08-11T10:05:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 11, 2025, 10:05am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/1 "2025-08-11T10:05:19Z")

</div>

Hello, I want to sync DB from MongoDB with CrateDB , but it’s error:

```python
<class ‘dlt.destinations.exceptions.DatabaseTransientException’>
“\_id” conflicts with system column pattern

```

```auto
InvalidColumnNameException["_id" conflicts with system column pattern]

```

How I can fix this ? I tried to write tikray file but my data is jsonl and it’s not work ☹

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 11, 2025, 10:10am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/2 "2025-08-11T10:10:49Z")

</div>

I run with command:

```auto
ctk load table “mongodb://user:pass@db_host/collection?table=collection.table&authSource=admin&readPreference=secondary”

```

Both source and destination were connected successfully.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/crate/original/2X/1/146cb89b730e7098056c4917459849633c6182fa.png)

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 11, 2025, 12:01pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/3 "2025-08-11T12:01:58Z")

</div>

Hi Võ Thiện,

thank you for writing in.

The [dlt-cratedb](https://github.com/crate/dlt-cratedb) adapter is still in its infancy, where this problem is originating from, accompanying CrateDB’s obstacle [SQL DDL error `InvalidColumnNameException["_foo" conflicts with system column pattern]` · Issue #15161 · crate/crate · GitHub](https://github.com/crate/crate/issues/15161). We created two issues [1] and [2] to track improving this.

So, we see three options going forward, which don’t necessarily exclude each other:

- Fix the flaw you’ve reported within dlt/ingestr, to also make others happy. 💯

- Use the [existing MongoDB data loader](https://cratedb-toolkit.readthedocs.io/io/mongodb/loader.html) in CrateDB Toolkit, which isn’t using `dlt` or `ingestr`. =\> Edit: This also needs to be fixed, see [CTK-499](https://github.com/crate/cratedb-toolkit/issues/499) and below. 🙈

- Use the [MongoDB integration for CrateDB Cloud](https://cratedb.com/docs/cloud/en/latest/cluster/integrations/mongo-cdc.html).  
=\> That is the most comfortable variant which has resolved all the basic issues well. ✨

Will one of the options enumerated above help you? Which would be the preferred one? Can you use the feature in CrateDB Cloud, or are you looking for one of the standalone options?

With kind regards,  
Andreas.

[1] [MongoDB: `dlt.destinations.exceptions.DatabaseTransientException: "_id" conflicts with system column pattern` · Issue #498 · crate/cratedb-toolkit · GitHub](https://github.com/crate/cratedb-toolkit/issues/498)  
[2] [Problem importing from MongoDB · Issue #19 · crate/dlt-cratedb · GitHub](https://github.com/crate/dlt-cratedb/issues/19)

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 11, 2025, 5:09pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/4 "2025-08-11T17:09:11Z")

</div>

> [@Vo\_Thien](#):
>
> How I can fix this ? I tried to write tikray file but my data is jsonl and it’s not work ☹

### Guidance

You certainly haven’t been wrong to also look at [Tikray](https://tikray.readthedocs.io/), because that package provides all sorts of transformations to the machinery in [CrateDB Toolkit](https://cratedb-toolkit.readthedocs.io/). However–this is mostly internal knowledge yet–it currently only works with the more native data nozzle subsystems in CTK, but not with the new ingestr-based subsystem just yet, afair.

However, don’t fret: CTK already includes built-in compensation code for CrateDB’s [GH-15161](https://github.com/crate/crate/issues/15161) obstacle within its MongoDB subsystem at this spot:

> <https://github.com/crate/cratedb-toolkit/blob/v0.0.37/cratedb_toolkit/io/mongodb/util.py#L33-L45>

### Another problem

However, based on your report, we discovered that the native MongoDB I/O subsystem of CTK has been disconnected by adding the one based on ingestr.

– [MongoDB: New ingestr-based I/O subsystem masks native adapters · Issue #499 · crate/cratedb-toolkit · GitHub](https://github.com/crate/cratedb-toolkit/issues/499)

In this spirit, it would be advisable to tackle this problem first, in order to unlock functionality that already exists \[1\] to provide instant improvements on your end.

NB: What’s your user handle on [GitHub](https://github.com/) by the way, so we can also tag you there on any updates that might be relevant for you?

* * *

1. You can observe from this occasion that CTK provides a fast-moving environment to accompany the needs for a polyglot data ingestion subsystem. In this case, you discovered a regression in adapter stacking, so thanks a stack [sic!] for your swift report! Apparently, we also need to check the QA why this might have slipped the automatic validations.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 11, 2025, 5:23pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/5 "2025-08-11T17:23:35Z")

</div>

### Downgrade CTK to the rescue

> [@amotl](#):
>
> […] in order to unlock functionality that already exists, to provide instant improvements on your end […]

What about downgrading to a previous version of CTK and trying that?

From its [releases page](https://github.com/crate/cratedb-toolkit/releases), we can discover only the most recent version [v0.0.37](https://github.com/crate/cratedb-toolkit/releases/tag/v0.0.37) includes the ingestr-based subsystem, so you could have a good chance to make `ctk load table` work with MongoDB by using the previous CTK version [v0.0.36](https://github.com/crate/cratedb-toolkit/releases/tag/v0.0.36).

Good luck, and please report back about any success or other failures. 🌻

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 11, 2025, 6:04pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/6 "2025-08-11T18:04:06Z")

</div>

### Use `uvx` or containers for ephemeral downgrading

> [@amotl](#):
>
> What about downgrading to a previous version of CTK and trying that?

> [@amotl](#):
>
> […] a good chance to make `ctk load table` work with MongoDB by using the previous CTK version [v0.0.36](https://github.com/crate/cratedb-toolkit/releases/tag/v0.0.36) […]

The fastest way to probe this if you are using `uv`/`uvx` \[1\] already, is to use that command, in this case as a temporary or permanent alias:

```shell
alias ctk='uvx --from=cratedb-toolkit[mongodb]==0.0.36 ctk'

```

If you are using Docker or Podman, use an alias like this:

```shell
alias ctk='docker run --rm -it --network=bridge "ghcr.io/crate/cratedb-toolkit:0.0.36" ctk'

```

Then, invoke `ctk` like you would have done it before:

```shell
ctk load table --help

```

* * *

1. [uv](https://docs.astral.sh/uv/)

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 2:52am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/7 "2025-08-12T02:52:39Z")

</div>

Oh no , I tried to use previous version , and I run command but it’s not have arg sslmode , I tried revome this arg but it can’t connect to cratedb . This is my command :

```shell
export CRATEDB_CLUSTER_URL=“crate://user:passwd@db_host/db?sslmode=disable”

ctk load table “mongodb://user:passwd@db_host/db?authSource=admin&readPreference=secondary”

```

The error is: `TypeError: Connection.init() got an unexpected keyword argument ‘sslmode’`

I tried to remove ssl argument but it’s can’t connect to my cratedb:

```python
Retrying (Retry(total=9, connect=None, read=0, redirect=None, status=None)) after connection broken by
‘ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7c8c51ca0c80>, ‘Connection to cratedb-dev.khacthienit.click timed out. (connect timeout=None)’)’: /

```

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 2:53am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/8 "2025-08-12T02:53:33Z")

</div>

Can you give me example command ? Both mongodb replicas and cratedb were hosted in K8s

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 12, 2025, 4:10am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/9 "2025-08-12T04:10:43Z")

</div>

> [@Vo\_Thien](#):
>
> It’s error TypeError: Connection. **init** () got an unexpected keyword argument ‘sslmode’

What happens if you omit the `sslmode` parameter? If you need to enable SSL here, you may want to try `?ssl=true`.

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 4:28am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/10 "2025-08-12T04:28:43Z")

</div>

Tks for your support , but issue still happening :

```auto
(ctk-env) ubuntu@ip-172-31-19-57:~/ctk-env$ export CRATEDB_CLUSTER_URL="crate://u:p@h:p/cloudstore?sslmode=true"
(ctk-env) ubuntu@ip-172-31-19-57:~/ctk-env$ ctk load table "mongodb://u:p@h:p/CloudStore?authSource=admin&readPreference=secondary"
2025-08-12 04:27:11,646 [cratedb_toolkit.io.mongodb.api] INFO : mongodb_copy. source=mongodb://u:p@h:p/CloudStore?authSource=admin&readPreference=secondary, target=crate://u:p@h:p/cloudstore?sslmode=true
2025-08-12 04:27:11,647 [cratedb_toolkit.io.mongodb.api] INFO : Inquiring collections at mongodb://u:p@h:p/CloudStore?authSource=admin&readPreference=secondary
2025-08-12 04:27:12,059 [cratedb_toolkit.io.mongodb.api] INFO : Discovered collections: 92
Traceback (most recent call last):
  File "/home/ubuntu/ctk-env/bin/ctk", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/cratedb_toolkit/io/cli.py", line 69, in load_table
    cluster.load_table(source=source, target=target, transformation=transformation)
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/cratedb_toolkit/cluster/core.py", line 587, in load_table
    if mongodb_copy(
       ^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/cratedb_toolkit/io/mongodb/api.py", line 170, in mongodb_copy
    MongoDBFullLoad(
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/cratedb_toolkit/io/mongodb/copy.py", line 46, in __init__
    self.cratedb_adapter = DatabaseAdapter(str(self.cratedb_sqlalchemy_url), echo=False)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/cratedb_toolkit/util/database.py", line 69, in __init__
    self.connection = self.engine.connect()
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3277, in connect
    return self._connection_cls(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 143, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3301, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 447, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1264, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 711, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get
    with util.safe_reraise():
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 224, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 175, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 673, in __init__
    self.__connect()
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 899, in __connect
    with util.safe_reraise():
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 224, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 895, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 661, in connect
    return dialect.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/ctk-env/lib/python3.12/site-packages/sqlalchemy_cratedb/dialect.py", line 233, in connect
    return self.dbapi.connect(servers=servers, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Connection. __init__ () got an unexpected keyword argument 'sslmode'

```

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 4:32am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/11 "2025-08-12T04:32:02Z")

</div>

I’m already downgrade version

```auto
(ctk-env) ubuntu@ip-172-31-19-57:~/ctk-env$ ctk --version
ctk, version 0.0.36
(ctk-env) ubuntu@ip-172-31-19-57:~/ctk-env$ ctk load table --help
Usage: ctk load table [OPTIONS] URL

  Import data into CrateDB and CrateDB Cloud clusters.

Options:
  --cluster-id TEXT CrateDB Cloud cluster identifier
  --cluster-name TEXT CrateDB Cloud cluster name
  --cluster-url TEXT CrateDB SQLAlchemy or HTTP URL
  --schema TEXT Schema where to import the data
  --table TEXT Table where to import the data
  --format TEXT File format of the import resource
  --compression TEXT Compression format of the import resource
  --transformation PATH Path to Tikray transformation file
  --help Show this message and exit.

```

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 4:44am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/12 "2025-08-12T04:44:49Z")

</div>

> [@Vo\_Thien](#):
>
> I tried to remove ssl argument but it’s can’t connect to my cratedb Retrying (Retry(total=9, connect=None, read=0, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(\<urllib3.connection.HTTPConnection object at 0x7c8c51ca0c80\>, ‘Connection to cratedb-dev.khacthienit.click timed out. (connect timeout=None)’)’: /

and I tried omit the ssl parameter before

```auto
Retrying (Retry(total=9, connect=None, read=0, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7c8c51ca0c80>, ‘Connection to cratedb-dev.khacthienit.click timed out. (connect timeout=None)’)’: /

```

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 12, 2025, 9:47am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/13 "2025-08-12T09:47:06Z")

</div>

Hi again.

> [@Vo\_Thien](#):
>
> `export CRATEDB_CLUSTER_URL="crate://u:p@h:p/cloudstore?sslmode=true"`

What happens if you define `CRATEDB_CLUSTER_URL` like this?

```auto
export CRATEDB_CLUSTER_URL="crate://u:p@h:p/cloudstore?ssl=true"

```

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 10:04am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/14 "2025-08-12T10:04:18Z")

</div>

Yah , the error was disappeard , but it’s don’t work

```auto
etrying (Retry(total=9, connect=None, read=0, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa1dc50bb30>, 'Connection to cratedb-dev.khacthienit.click timed out. (connect timeout=None)')': /

```

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 12, 2025, 10:04am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/15 "2025-08-12T10:04:51Z")

</div>

same error when I don’t use ssl argument

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 12, 2025, 3:32pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/16 "2025-08-12T15:32:24Z")

</div>

Thank you Võ, apologies that it didn’t work for you in an instant, and also not after exploring a few parameter permutations. Let me now have a look into the issue so we may come up with a new release and enhanced documentation that improves the situation for you.

---

<div class="post-metadata">

**Author:** ![Vo\_Thien](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/vo_thien/32/1406_2.png) [@Vo\_Thien](https://community.cratedb.com/u/Vo_Thien)\
**Post date:** [August 13, 2025, 2:19am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/17 "2025-08-13T02:19:54Z")

</div>

Can you let me know when new document release ? I really need it now ☹

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 13, 2025, 5:16pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/18 "2025-08-13T17:16:48Z")

</div>

Dear Võ,

we’ve not evaluated your particular situation around SSL/TLS yet, but we can confirm the data transfer procedure works well when using CTK v0.0.36, as outlined below.

Maybe you can derive some insights from the `ctk load table` incantation you’ve missed before? We will promptly also exercise a situation using SSL/TLS and report back about it.

With kind regards,  
Andreas.

> **MongoDB =\> CrateDB**
>
> Start MongoDB.
> 
> ```shell
> docker run --rm --name=mongodb --publish=27017:27017 mongo:7
> 
> ```
> 
> Start CrateDB.
> 
> ```shell
> docker run --rm --name=cratedb \
> --publish=4200:4200 --publish=5432:5432 \
> --env=CRATE_HEAP_SIZE=2g crate/crate:6.0.0 -Cdiscovery.type=single-node
> 
> ```
> 
> Insert record into MongoDB collection; you can also do it twice or more.
> 
> ```shell
> mongosh --eval 'db.testdrive.insert({"temperature": 42.84, "humidity": 83.1})'
> 
> ```
> 
> Invoke data transfer.
> 
> ```shell
> alias ctk='uvx --from=cratedb-toolkit[mongodb]==0.0.36 ctk'
> ctk load table \
> "mongodb://localhost/test/testdrive" \
> --cluster-url="crate://localhost/doc/testdrive"
> 
> ```
> 
> Inspect data in CrateDB.
> 
> ```shell
> crash -c "SELECT * FROM doc.testdrive"
> 
> ```

* * *

**Documentation:**

> **[Load data from MongoDB into CrateDB](https://cratedb.com/docs/guide/integrate/mongodb/usage.html)**
>
> The usage guide will walk you through starting MongoDB and CrateDB, inserting a record into a MongoDB collection, transferring the collection into a CrateDB table, and validating that the data has been stored successfully. The data transfer is...

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 13, 2025, 6:12pm UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/19 "2025-08-13T18:12:08Z")

</div>

Hi again,

> [@amotl](#):
>
> We will promptly also exercise a situation using SSL/TLS and report back about it.

We used a CrateDB Cloud CRFREE cluster on the destination end, and it works for us with CTK v0.0.36. Please note the `?ssl=true` parameter on the CrateDB cluster URL.

```shell
alias ctk='uvx --from=cratedb-toolkit[mongodb]==0.0.36 ctk'
ctk load table \
  "mongodb://localhost/test/testdrive" \
  --cluster-url="crate://admin:{redacted}@testcluster.aks1.westeurope.azure.cratedb.net/doc/testdrive?ssl=true"

```

Please let us know if that works for you, or if you need further assistance.

With kind regards,  
Andreas.

NB: When using Docker, this would be the appropriate overlay command for ad hoc use of CrateDB Toolkit v0.0.36, where `uvx` was used above.

```shell
alias ctk='docker run --rm -it --network=bridge "ghcr.io/crate/cratedb-toolkit:0.0.36" ctk'

```

NB: The other command syntax that goes for MongoDB like `/collection?table=collection.table`, coming from ingestr, does not fit that interface, i.e. is wrong, so please don’t use it. In the same spirit, we will remove it from the [documentation](https://cratedb-toolkit.readthedocs.io/io/ingestr/index.html#mongodb-to-cratedb), because it seems not to be ready yet. Sorry for the confusion and thanks for your patience.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [August 14, 2025, 12:16am UTC](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062/20 "2025-08-14T00:16:35Z")

</div>

> [@amotl](#):
>
> What about downgrading to a previous version of CTK and trying that?

> [@amotl](#):
>
> ad hoc use of CrateDB Toolkit v0.0.36 [works]

Hi. [CrateDB Toolkit v0.0.38](https://github.com/crate/cratedb-toolkit/releases/tag/v0.0.38), just released, fixes the problem so you will no longer need to use a specific previous release of CTK. Now, CTK uses the native MongoDB I/O adapter again. Please let us know if you observe any other problems, or if that works well for you now.

> **[MongoDB I/O Subsystem](https://cratedb-toolkit.readthedocs.io/io/mongodb/)**
>
> About: Using the MongoDB subsystem, you can transfer data from and to MongoDB. MongoDB Table Loader, MongoDB CDC Relay.

[Next page](https://community.cratedb.com/t/using-cratedb-toolkit-to-sync-mongodb-with-cratedb/2062.md?page=2)
