v.22.6New Feature
Add New Columnar JSON Formats: JSONColumns, JSONCompactColumns, JSONColumnsWithMetadata
Add new columnar JSON formats:JSONColumns,JSONCompactColumns,JSONColumnsWithMetadata. Closes #36338 Closes #34509. #36975 (Kruglov Pavel).
Why it matters
These new JSON formats provide a column-oriented serialization of data, improving interoperability and performance when exporting data as JSON. They address limitations of traditional row-oriented JSON formats by enabling more compact representations and including metadata where necessary.How to use it
Users can specify the new JSON formats in their queries or data export commands by setting the output format option toJSONColumns, JSONCompactColumns, or JSONColumnsWithMetadata. For example:SELECT * FROM table_name FORMAT JSONColumnsThis allows exporting query results in the desired columnar JSON format.