prestodb/presto · error · UncheckedIOException
Error creating BigQueryReadClient
Error message
Error creating BigQueryReadClient
What it means
Thrown by BigQueryReadClientFactory.createBigQueryReadClient when BigQueryReadClient.create(clientSettings) throws an IOException while constructing the BigQuery Storage Read API client. The wrapper preserves the cause; typically the failure is in client settings resolution (endpoint, credentials provider, transport) rather than in the read itself. It prevents BigQueryResultPageSource from starting streamed reads.
Source
Thrown at presto-bigquery/src/main/java/com/facebook/presto/plugin/bigquery/BigQueryReadClientFactory.java:57
{
this.credentials = bigQueryCredentialsSupplier.getCredentials();
this.headerProvider = headerProvider;
}
BigQueryReadClient createBigQueryReadClient()
{
try {
BigQueryReadSettings.Builder clientSettings = BigQueryReadSettings.newBuilder()
.setTransportChannelProvider(
BigQueryReadSettings.defaultGrpcTransportProviderBuilder()
.setHeaderProvider(headerProvider)
.build());
credentials.ifPresent(credentials ->
clientSettings.setCredentialsProvider(FixedCredentialsProvider.create(credentials)));
return BigQueryReadClient.create(clientSettings.build());
}
catch (IOException e) {
throw new UncheckedIOException("Error creating BigQueryReadClient", e);
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Configure bigquery.credentials-key with a valid service-account key, or ensure Application Default Credentials are available (GOOGLE_APPLICATION_CREDENTIALS / GCE metadata server)
- Check the wrapped IOException cause for the root reason (credential fetch vs endpoint vs network)
- Verify network/TLS access from Presto nodes to the BigQuery Storage endpoint (bigquerystorage.googleapis.com)
- If bigquery.storage-endpoint was overridden, revert it to the default or correct the hostname
- Confirm the service account has BigQuery Read Session User / Data Viewer roles
Example fix
// before (no credentials configured on non-GCE host) # catalog properties missing credentials-key // after bigquery.credentials-key=/etc/presto/sa.json bigquery.credentials-keyfile-password=not-needed-for-json
Defensive patterns
Strategy: validation
Validate before calling
// verify ADC/credentials resolvable before creating the client
GoogleCredentials creds = GoogleCredentials.getApplicationDefault(); // throws if none
cs.ifPresent(c -> clientSettings.setCredentialsProvider(FixedCredentialsProvider.create(c)));
// ensure endpoint reachable
InetAddress.getByName("bigquerystorage.googleapis.com"); Try / catch
try {
readClient = factory.createBigQueryReadClient(credentials);
} catch (UncheckedIOException e) {
if (e.getMessage().contains("Error creating BigQueryReadClient")) {
// inspect e.getCause() for credential vs endpoint vs network failure
throw new PrestoException(BIGQUERY_READ_SESSION_ERROR, "Read client init failed: " + e.getCause().getMessage(), e);
}
throw e;
} Prevention
- Configure bigquery.credentials-key or ensure GOOGLE_APPLICATION_CREDENTIALS/metadata server is available on all worker nodes
- Test Storage API connectivity (DNS/TLS to bigquerystorage.googleapis.com) in node bootstrap
- Avoid overriding bigquery.storage-endpoint unless required and verified
- Grant the service account BigQuery Read Session User and Data Viewer roles
When it happens
Trigger: BigQueryReadClient.create(clientSettings.build()) throws IOException, commonly because credentials were absent/invalid (no FixedCredentialsProvider applied and no Application Default Credentials available), an invalid custom endpoint, or transport/TLS initialization failure.
Common situations: bigquery.credentials-key not configured and the Presto host has no Application Default Credentials (no metadata server / GOOGLE_APPLICATION_CREDENTIALS); corrupt key file producing unusable credentials; network egress blocked to bigquerystorage.googleapis.com; a bad bigquery.storage-endpoint override.
Related errors
- Failed to create Credentials from file
- BIGQUERY_QUERY_FAILED_UNKNOWN
- Failed to create Credentials from key
- BIGQUERY_TABLE_DISAPPEAR_DURING_LIST
- BIGQUERY_UNSUPPORTED_COLUMN_TYPE
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/36312cb2713e364c.
Report an issue: GitHub.