Class BigQueryCredentials
java.lang.Object
io.github.flink.gcp.connector.bigquery.BigQueryCredentials
Loads credentials shared by the BigQuery and Cloud Storage client families.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.cloud.bigquery.BigQueryOptionsbigQueryOptions(String serviceAccountKeyFile) Builds BigQuery REST client options carrying the configured service-account credentials.static com.google.auth.oauth2.GoogleCredentialsLoads a service-account key file, or returnsnullto leave application-default credentials in effect.
-
Method Details
-
load
@Nullable public static com.google.auth.oauth2.GoogleCredentials load(@Nullable String serviceAccountKeyFile) throws IOException Loads a service-account key file, or returnsnullto leave application-default credentials in effect.A failure names only the product, never the path or the parser's exception;
ServiceAccountKeys.load(String, java.util.Collection, String)owns that rule.- Parameters:
serviceAccountKeyFile- the configured key-file path, ornullfor ADC- Returns:
- the scoped service-account credentials, or
nullfor ADC - Throws:
IOException- if the configured file cannot be read as a service-account key
-
bigQueryOptions
public static com.google.cloud.bigquery.BigQueryOptions bigQueryOptions(String serviceAccountKeyFile) throws IOException Builds BigQuery REST client options carrying the configured service-account credentials.- Throws:
IOException
-