In my mongoDB, there are nested data structures with three different levels, as the pictures are shown . Since mongo engine in clickhouse doesn't support such structures, I try to define these fields as String when creating table using mongoDB engine, but failed to retrieve data. Should I predefine new tables(normalise each nested structure) and then insert values from mongo to CH? Do you have alternatives?



From https://clickhouse.tech/docs/en/engines/table-engines/integrations/mongodb/
You can use Map data type if you can flatten the schema of the MongoDB collection.
Alternatively, you can save the whole document (JSON) as
Stringand work on it with JSON functions.