Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ClickHouse launches Claude-powered Agents and House Mates partner program at Open House 2026 Read more →
计算存储在 JSON 列中的不同路径列表。
distinctJSONPaths(json)
json
JSON
Array(String)
DROP TABLE IF EXISTS test_json; CREATE TABLE test_json(json JSON) ENGINE = Memory; INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}'); SELECT distinctJSONPaths(json) FROM test_json;
┌─distinctJSONPaths(json)───┐ │ ['a','b','c.d.e','c.d.f'] │ └───────────────────────────┘
DROP TABLE IF EXISTS test_json; CREATE TABLE test_json(json JSON) ENGINE = Memory; INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}') SELECT distinctJSONPaths(json) FROM test_json;
┌─distinctJSONPaths(json)─┐ │ ['a','b','c'] │ └─────────────────────────┘
此页面对您有帮助吗?