v.24.9Experimental Feature

Add aggregate functions for JSON column introspection

Add aggregate functions distinctDynamicTypes/distinctJSONPaths/distinctJSONPathsAndTypes for better introspection of JSON column type content. #68463 (Kruglov Pavel).
Added new aggregate functions distinctDynamicTypes, distinctJSONPaths, and distinctJSONPathsAndTypes to enhance introspection of JSON column type content in ClickHouse.

Why it matters

These functions provide users with better tools to analyze and understand the structure and variety of data types and paths within JSON columns. This helps in identifying dynamic types and paths present across JSON data, improving schema discovery and data quality assessment.

How to use it

Use the new aggregate functions distinctDynamicTypes, distinctJSONPaths, and distinctJSONPathsAndTypes within your SELECT queries on JSON columns to introspect their content. For example:

SELECT distinctDynamicTypes(json_column) FROM table;
SELECT distinctJSONPaths(json_column) FROM table;
SELECT distinctJSONPathsAndTypes(json_column) FROM table;