Skip to main content

Google Cloud Storage Import

SereneDB can read and write Google Cloud Storage (GCS) over HTTP(S) directly.

Credentials and Configuration​

You need to create HMAC keys and declare them:

SQL
CREATE SECRET (    TYPE gcs,    KEY_ID '⟨AKIAIOSFODNN7EXAMPLE⟩',    SECRET '⟨wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY⟩');

Querying​

After setting up the GCS credentials, you can query the GCS data using:

SQL
SELECT *FROM read_parquet('gs://⟨gcs_bucket⟩/⟨file.parquet⟩');
 id | name  | value
----+-------+-------
  1 | alpha |    10
  2 | beta  |    20

Attaching to a Database​

You can attach to a database file in read-only mode:

SQL
ATTACH 'gs://⟨gcs_bucket⟩/⟨file.duckdb⟩' AS ⟨duckdb_database⟩ (READ_ONLY);