bytehouse

CREATE TABLE IF NOT EXISTS datacollection.volce_json_table
(
left_image String,
left_image_resolution String,
right_image String,
right_image_resolution String,
disparity String,
disparity_image_resolution String,
timestamp String,
timezone String,
nation String,
region String,
camera_params Tuple(
fx Float64,
fy Float64,
cx Float64,
cy Float64,
bxf Float64,
baseline Float64
),
device Tuple(
camera_id String,
sdk_version String,
x5_board_id String
),
env Tuple(
weather String,
lighting String
)
)
ENGINE = CnchMergeTree
ORDER BY timestamp;
CREATE TABLE IF NOT EXISTS datacollection.volce_json_table_s3 AS datacollection.volce_json_table
ENGINE=CnchS3(
'https://volce-json.tos-s3-cn-shanghai.volces.com/*.json',
'JSONEachRow',
'none',
'AKLTMThjOTEyMzlmOWRiNDliNzgzYzA0NWNhYTQyYTYzNGY',
'WVRVMU9XUTBaV0l5WWpsbU5HRTBNRGxpTkRVNU5qUmpNVGMzT0RJeU1XUQ=='
);

CREATE TABLE IF NOT EXISTS datacollection.volce_json_table
(
sn String,
id String,
left_image String,
left_image_resolution String,
right_image String,
right_image_resolution String,
disparity String,
disparity_image_resolution String,
timestamp String,
timezone String,
nation String,
region String,
camera_params Tuple(
fx Float64,
fy Float64,
cx Float64,
cy Float64,
bxf Float64,
baseline Float64
),
device Tuple(
camera_id String,
sdk_version String,
x5_board_id String
),
env Tuple(
weather String,
lighting String
)
)
ENGINE = CnchMergeTree()
PARTITION BY toDate(fromUnixTimestamp(divide(toInt64(timestamp), 1000)))
ORDER BY (id, timestamp)
TTL toDate(fromUnixTimestamp(divide(toInt64(timestamp), 1000))) + INTERVAL 365 DAY;

posted @ 2026-05-20 12:22  kevinWwm  阅读(8)  评论(0)    收藏  举报