Float64,
Debugs Nested
(
numbers UInt32,
lowNumbers UInt16,
direction Enum('UNKNOWN' = 0, 'EGRESS' = 1, 'INGRESS' = 2),
content String
),
)
ENGINE = MergeTree()
ORDER BY (startTime);
echo '{
"startTime": 1698389379.400664,
"debug": {
"numbers": 703345,
"lowNumbers": 3,
"direction": "EGRESS",
"content": "some_string"
}
}' | clickhouse-client -h 127.1 --query="INSERT INTO test_db.test_nested_json format JSONEachRow" --input_format_import_nested_json 1
1) Nested = Array(Tuple(...)), а в данных у вас просто JSON object (= Tuple) 2) Имя колонки в таблице Debugs, в данных debug https://pastila.nl/?0135ffd8/6a53a53edbe6b00d368d398a5c6f3cfe#lmgZSj32BkH72mdWGIxyUQ==
Обсуждают сегодня