ClickHouse / ClickHouse/ClickHouse

To select a json object from mongodb in clickhouse.

Open
#64,097 9 comments 0 reactions 0 assignees View on GitHub
bug comp-foreign-db external question
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

I have a nested object in my mongo db table the column is
affiliate_bag_details
```
{
"test": "12",
"obj": {
"nested": [1,2,4]
}
}
```
while fetching the same using the function MongoDB
```
SELECT
bag_id,
display_name,
affiliate_bag_details
FROM mongodb(
':host',
'db',
'collection',
'username',
'password!2018',
'affiliate_bag_details String',
'connectTimeoutMS=10000'
)
LIMIT 10;
```
Getting the following error
`Exception: Type mismatch, expected String, got type id = 3 for column affiliate_bag_details: While executing MongoDB.`
Can anyone please suggest what is an alternative schema that i can use to perform the above operation?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.