Query Apache Iceberg external tables
This document describes how to query data stored in Iceberg external tables.
Required roles
To query Iceberg external tables, ensure that the caller of the BigQuery API has the following roles:
- BigQuery Connection User (
roles/bigquery.connectionUser) - BigQuery Data Viewer (
roles/bigquery.dataViewer) - BigQuery User (
roles/bigquery.user)
The caller can be your account, a Spark connection service account, or a Cloud resource connection service account. Depending on your permissions, you can grant these roles to yourself or ask your administrator to grant them to you. For more information about granting roles, see Viewing the grantable roles on resources.
To see the exact permissions that are required, expand the Required permissions section:
Required permissions
bigquery.connections.usebigquery.jobs.createbigquery.readsessions.create(Only required if you are reading data with the BigQuery Storage Read API)bigquery.tables.getbigquery.tables.getData
You might also be able to get these permissions with custom roles or other predefined roles.
Query Iceberg external tables
After creating an Iceberg external table, you can query it using
GoogleSQL syntax, the same as if
it were a standard BigQuery table. For example, SELECT field1, field2
FROM mydataset.my_iceberg_table;.
What's next
- Learn about using SQL in BigQuery.
- Learn about BigQuery quotas.