You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: 'ClickPipes for MongoDB: Supported data types'
2
+
title: 'Supported data types'
3
3
slug: /integrations/clickpipes/mongodb/datatypes
4
4
description: 'Page describing MongoDB ClickPipe datatype mapping from MongoDB to ClickHouse'
5
5
---
6
6
7
-
MongoDB stores data records as BSON documents. In ClickPipes, you can configure to ingest BSON documents to ClickHouse as either JSON or JSON String. The following table shows the supported BSON to JSON type mapping:
7
+
MongoDB stores data records as BSON documents. In ClickPipes, you can configure to ingest BSON documents to ClickHouse as either JSON or JSON String. The following table shows the supported BSON to JSON field type mapping:
8
8
9
9
| MongoDB BSON Type | ClickHouse JSON Type | Notes |
@@ -15,11 +15,15 @@ MongoDB stores data records as BSON documents. In ClickPipes, you can configure
15
15
| Double | Float64 ||
16
16
| Boolean | Bool ||
17
17
| Date | String | ISO 8601 format |
18
-
| Regular Expression |\{Options: String, Pattern: String\}| MongoDB regex with fixed fields: Options (regex flags) and Pattern (regex pattern) |
19
-
| Timestamp |\{T: Int64, I: Int64\}| MongoDB internal timestamp format with fixed fields: T (timestamp) and I (increment) |
18
+
| Regular Expression |\{Options: String, Pattern: String\}| MongoDB regex with fixed fields: Options (regex flags) and Pattern (regex pattern) |
19
+
| Timestamp |\{T: Int64, I: Int64\}| MongoDB internal timestamp format with fixed fields: T (timestamp) and I (increment) |
20
20
| Decimal128 | String ||
21
-
| Array | Array(Nullable(String)) ||
22
-
| Binary data | Array(Nullable(Int64)) | Array of byte values |
21
+
| Binary data |\{Data: String, Subtype: Int64\}| MongoDB binary data with fixed fields: Data (base64-encoded) and Subtype ([type of binary](https://www.mongodb.com/docs/manual/reference/bson-types/#binary-data)) |
23
22
| JavaScript | String ||
24
23
| Null | Null ||
24
+
| Array | Dynamic | Arrays with homogeneous types become Array(Nullable(T)); arrays with mixed primitive types are promoted to the most general common type; arrays with complex incompatible types become Tuples |
25
25
| Object | Dynamic | Each nested field is mapped recursively |
26
+
27
+
:::info
28
+
To learn more about ClickHouse's JSON data types, see [our documentation](https://clickhouse.com/docs/sql-reference/data-types/newjson).
3. To use Key-based authentication, click on "Revoke and generate key pair" to generate a new key pair and copy the generated public key to your SSH server under `~/.ssh/authorized_keys`.
79
-
4. Click on "Verify Connection" to verify the connection.
80
-
81
-
:::note
82
-
Make sure to whitelist [ClickPipes IP addresses](../clickpipes#list-of-static-ips) in your firewall rules for the SSH bastion host so that ClickPipes can establish the SSH tunnel.
83
-
:::
84
-
85
68
Once the connection details are filled in, click `Next`.
0 commit comments