LOAD 'chdb_hook'; -- Simple COPY FROM without credentials. CREATE TABLE gcs_times ( id INT PRIMARY KEY, months INT NOT NULL, days INT NOT NULL ); -- Try Public URL. COPY gcs_times FROM 'gcs://storage.googleapis.com/clickhouse_public_datasets/my-test-bucket-768/data.csv.gz'; SELECT * FROM gcs_times ORDER BY id; id | months | days ----+--------+------ 1 | 2 | 3 3 | 2 | 1 4 | 5 | 6 (3 rows) -- Try Cloud Storage URI. TRUNCATE gcs_times; COPY gcs_times FROM 'gcs://clickhouse_public_datasets/my-test-bucket-768/data.csv.gz'; SELECT * FROM gcs_times ORDER BY id; id | months | days ----+--------+------ 1 | 2 | 3 3 | 2 | 1 4 | 5 | 6 (3 rows) \set ECHO errors -- Create some random data to copy. CREATE TABLE gcs_things ( id INT PRIMARY KEY, name TEXT NOT NULL, quantity INT NOT NULL ); INSERT INTO gcs_things SELECT id, format('thing-%s', (random() * 100)::int), (random() * 1000)::int FROM generate_series(1, 3) AS id; -- Copy to existing file to ensure s3_truncate_on_insert is true. COPY gcs_things TO 'gs://storage.googleapis.com/pg-chdb-ci/keep-me.tsv' ( access_key :'access_key', access_secret :'access_secret' ); \set ECHO errors -- Copy the data to GCS. COPY gcs_things TO :'url' ( access_key :'access_key', access_secret :'access_secret' ); -- Copy it back. CREATE TABLE gcs_things2 (LIKE gcs_things INCLUDING ALL); COPY gcs_things2 FROM :'url' ( access_key :'access_key', access_secret :'access_secret' ); -- Make sure they're the same. WITH x AS ( SELECT * FROM gcs_things EXCEPT ALL SELECT * FROM gcs_things2 ) SELECT COUNT(*) = 0 AS same FROM x \gset \set ECHO errors Table contents the same