Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
ClickHouse でデータを整理するためのカスタムパス構造を使って、年別・月別にパーティション分けしたデータを S3 バケットに書き込む方法を学びます。
CREATE TABLE sample_data ( `name` String, `age` Int, `time` DateTime ) ENGINE = MergeTree ORDER BY name
INSERT INTO sample_data SELECT * FROM generateRandom( 'name String, age Int, time DateTime', 10, 10, 10 ) LIMIT 10000;
my_bucket
INSERT INTO FUNCTION s3( 'https://s3-host:4321/my_bucket/{_partition_id}/file.parquet.gz', 's3-access-key', 's3-secret-access-key', Parquet, 'name String, age Int, time DateTime' ) PARTITION BY concat( formatDateTime(time, '%Y'), '/', formatDateTime(time, '%m') ) SELECT name, age, time FROM sample_data Query id: 55adcf22-f6af-491e-b697-d09694bbcc56 Ok. 0 rows in set. Elapsed: 15.579 sec. Processed 10.00 thousand rows, 219.93 KB (641.87 rows/s., 14.12 KB/s.)
このページは役に立ちましたか?