Reputation: 301
I'm trying to instantiate BigQueryTemplate without the environment variable GOOGLE_APPLICATION_CREDENTIALS
.
Steps tried:
CredentialsSupplier
by instantiating Credentials
and setting location to service account json file.BigQuery
using BigQueryOptions::newBuilder()
and setting credentials and project id.spring-cloud-gcp-dependencies
3.4.0
version is used.
The application executing in VM (non-gcp env).
Another option I tried is adding below properties
datasetname
file:/path/to/json
project-id
I'm getting below error
com.google.cloud.spring.bigquery.core.BigQueryTemplate,
applog.mthd=lambda$writeJsonStream$0,
applog.line=299, applog.msg=Error:
The Application Default Credentials are not available.
They are available if running in Google Compute Engine.
Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials.
Please let me know if I have missed any thing. Thanks in advance.
Upvotes: 0
Views: 281