Error writing data to Google Bigquery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2022 12:25 PM
Hi,
I am able to read data from a Bigquery table ,But am getting error writing data to a table in Bigquery
Followed instuctions in this document.
Connecting Databricks to BigQuery | Google Cloud
%scala
import scala.io.Source
val contentCred = "/dbfs/FileStore/keys/uday_123.json"
val jsonBytes = Source.fromFile(contentCred).getLines.mkString
myEvents.write.format("bigquery").mode("overwrite").option("temporaryGcsBucket", "databricks-bq-789")
.option("credentials", new String(java.util.Base64.getEncoder.encode(jsonBytes.getBytes)))
.option("parentProject", "uday-***")
.option("project", "uday-***")
.option("table","uday-***.uday_testdata.employee1")
.save()
Error:
IOException: Error getting access token from metadata server at: http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token
Caused by: HttpResponseException: 404 Not Found
GET http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token
ResourceNotFoundThe specified resource does not exist.
'computeMetadata' isn't a valid resource name.
- Labels:
-
Bigquery
-
Google Bigquery