Closed mikenikles closed 4 years ago
As you can notice from documentation of Nested, its just a "syntax sugar".
Nested columns is presented as column with type Array(x)
and it name is prefixed with name of nested using dot separator.
This means that you are don’t need any specific support for Nested, and you can use any input/output format that supports arrays.
JSONEachRow
is good enough for most cases.
You can read more about working with Nested here:
Also you may be interested in input_format_import_nested_json=1
, which just allows you to insert nested data as structured JSON.
This creates a lot of problems when selecting with data, and also this will lead to performance issues of queries.
Just think about Nested as additional columns with type Array(x)
Thanks Dmitry, this is very helpful. After playing around, I found the links you shared and managed to insert nested data.
However, given your recommendation, I'll change that to individual columns. Very helpful, thanks for the detailed explanations.
Hi,
One of my columns is of type
Nested
as described at https://clickhouse.tech/docs/en/sql-reference/data-types/nested-data-structures/nested/.Are there any plans to support that?
Thanks,
Mike