distinctJSONPaths
Calculates the list of distinct paths stored in JSON column.
Syntax
Arguments
json
— JSON column.
Returned Value
- The sorted list of paths Array(String).
Example
Query:
Result:
distinctJSONPathsAndTypes
Calculates the list of distinct paths and their types stored in JSON column.
Syntax
Arguments
json
— JSON column.
Returned Value
- The sorted map of paths and types Map(String, Array(String)).
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.