Skip to main content
Skip to main content

distinctJSONPaths

Calculates a list of distinct paths stored in a JSON column.

Syntax

Arguments

  • jsonJSON column.

Returned Value

Example

Query:

Result:

distinctJSONPathsAndTypes

Calculates the list of distinct paths and their types stored in JSON column.

Syntax

Arguments

  • jsonJSON column.

Returned Value

Example

Query:

Result:

Note

If JSON declaration contains paths with specified types, these paths will be always included in the result of distinctJSONPaths/distinctJSONPathsAndTypes functions even if input data didn't have values for these paths.

Try ClickHouse Cloud for FREE

Separation of storage and compute, automatic scaling, built-in SQL console, and lots more. $300 in free credits when signing up.

Try it for Free