Skip to main content

S3 Iceberg Import

Credentials

To read Iceberg data from S3, set up the credentials and S3 region. You may either use an access key and secret, or a token.

Query
CREATE SECRET (    TYPE s3,    KEY_ID '⟨AKIAIOSFODNN7EXAMPLE⟩',    SECRET '⟨wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY⟩',    REGION '⟨us-east-1⟩');

Loading Iceberg Tables from S3

Once the S3 credentials are configured, Iceberg tables can be read from S3 using the following command:

Query
SELECT *FROM iceberg_scan('s3://⟨bucket⟩/⟨iceberg_table_folder⟩/metadata/⟨id⟩.metadata.json');
Result
 id | name  | value----+-------+-------  1 | alpha |    10  2 | beta  |    20

Note that you need to link directly to the manifest file. Otherwise, you'll get an error like this:

IO Error:
Cannot open file "s3://bucket/iceberg_table_folder/metadata/version-hint.text": No such file or directory