Skip to Content
CatalogsS3, GCS, Azure & R2

S3, GCS, Azure Blob Storage & Cloudflare R2

Object-storage catalogs hold files, not tables. There is nothing to address as catalog.schema.table; you read by path, and the catalog name resolves to its bucket or container.

SELECT * FROM read_parquet('raw_files/events/2026/*.parquet'); SELECT * FROM read_csv('raw_files/exports/customers.csv'); SELECT * FROM read_json('raw_files/logs/*.jsonl'); SELECT * FROM read_xlsx('raw_files/finance/budget.xlsx');

raw_files/ is the catalog name. It is rewritten to the real bucket URL with the catalog’s own credentials, so no s3:// URLs and no keys appear in your SQL. To explore a bucket as a folder tree instead, use Files & Studio.

What you need

TypeFields
S3Bucket, region, access key id, secret access key
GCSBucket, and an HMAC credentials JSON (interoperability keys, not a service-account key)
AzureContainer, storage account name and account key
Cloudflare R2Bucket, account ID, and an R2 API token’s access key ID and secret access key (step-by-step setup)

One catalog is one bucket or container — there is no prefix scoping, so a catalog grants access to everything in it. For anything shared, use a dedicated bucket and a read-only identity confined to it.

For reading only, give the catalog a read-only identity. To also export files into the bucket, the registered keys must be able to write; see Write access.

For R2, create the token under R2 → Manage API tokens with Object Read only, scoped to the one bucket (Object Read & Write to export files). The account ID is the 32-character ID shown on the same page. Buckets in a jurisdiction (EU, FedRAMP) are not supported yet.

Amazon S3 with an IAM role

Instead of storing access keys, an S3 catalog can assume an IAM role in your AWS account. No keys are stored in Thunderduck. Queries and pipelines use short-lived credentials from that role. Every access shows in your CloudTrail under that role, and you revoke access by editing the role’s trust policy.

In the catalog form, set Authentication to IAM role. The form shows two values to use in AWS:

  • Thunderduck principal ARN, the identity that assumes your role.
  • External ID, specific to your company.

Both have copy buttons.

  1. In your own AWS account, create an IAM role (IAM → Roles → Create role → Custom trust policy) with this trust policy. Paste the principal ARN and external ID from the form. Roles in Thunderduck’s own AWS account are refused.

    { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "AWS": "<principal ARN shown in the console>" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "sts:ExternalId": "<your external ID>" } } }] }
  2. Attach a permissions policy to the role, not to the bucket: IAM → Roles → your role → Add permissions → Create inline policy → JSON. (A bucket policy would need a Principal and isn’t required.) For reading:

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::<bucket>" }, { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::<bucket>/*" } ] }

    To also export files into the bucket, add s3:PutObject on arn:aws:s3:::<bucket>/*.

  3. In the form, enter the bucket, region and the role ARN, then save.

Saving checks access. If it fails, the error says what to fix:

  • Thunderduck couldn't assume the role. Check that its trust policy names <principal> with external ID <ext>.
  • The role was assumed but can't list s3://<bucket>. Check the role's permissions policy.

Pipelines (dbt) get one session per run, issued when the run starts. It lasts as long as your company’s run timeout, up to 12 hours, but no longer than the role allows. A new IAM role allows 1 hour by default. For pipelines that run longer than an hour, raise the role’s Maximum session duration (IAM console, role summary, Edit), up to 12 hours. If Thunderduck can’t assume a catalog’s role when a run starts, the run still starts, and reads from that catalog’s bucket fail with an AWS access error.

IAM roles work for Amazon S3 only. S3-compatible endpoints (MinIO and similar), Cloudflare R2, GCS and Azure still use keys. The option does not appear on GCP-hosted deployments.

Hive partitioning

Partitioned layouts work, and the partition keys come back as columns:

SELECT partdate, count(*) FROM read_json('raw_files/src_events/*/*.jsonl', hive_partitioning = true) GROUP BY partdate ORDER BY partdate;

No discovery

These catalogs do not appear on the Tables page with a table list, because there is nothing to enumerate — files are not schemas. That is expected, not a failed refresh.

Excel specifics

read_xlsx is available everywhere, including in dbt models. One gotcha: xlsx has no integer type, so whole numbers arrive as DOUBLE. Cast them if you plan to join on them:

SELECT CAST(id AS BIGINT) AS id, name FROM read_xlsx('raw_files/finance/budget.xlsx', sheet = 'Sheet2');