Overview
ClickHouse provides several approaches for handling JSON, each with its respective pros and cons and usage. In this guide, we will cover how to load JSON and design your schema optimally. This guide consists of the following sections:
- Loading JSON - Loading and querying JSON (specifically, NDJSON) in ClickHouse with simple schemas.
- JSON schema inference - Using JSON schema inference to query JSON and create table schemas.
- Designing JSON schema - Steps to design and optimize your JSON schema.
- Exporting JSON - How to export JSON.
- Handling other JSON Formats - Some tips on handling JSON formats other than NDJSON.
- Other approaches to modelling JSON - Advanced approaches to modelling JSON. Not recommended.
Important: A new JSON type will be released soon
This guide considers existing techniques for handling JSON. A new JSON type is being actively developed and will be available soon. You can track the progress of this feature by following this GitHub issue. This new data type will replace the existing deprecated Object Data Type (alias JSON
).