bigquery4s icon indicating copy to clipboard operation
bigquery4s copied to clipboard

Connection to BQ from inside DataPRoc

Open yanasega opened this issue 7 years ago • 1 comments

Hi, I'm trying to run my scala code from a dataproc cluster and get this error: Exception in thread "main" java.io.FileNotFoundException: /root/.bigquery/client_secret.json (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at bigquery4s.BigQuery$.fromClientSecretJson(BigQuery.scala:137) at bigquery4s.BigQuery$.apply(BigQuery.scala:125) So that means its looking for fromClientSecretJson instead of fromServiceAccount, can someone suggest how to redirect it to the latter? Thanks,

yanasega avatar Sep 13 '18 13:09 yanasega

I think this only means that the file is not existent in that path @yanasega you should add your client_secret.json to /root/.bigquery/client_secret.json

EDIT: Sorry misunderstood last part, can you show the line where you initiate BigQuery()? Did you try using BigQuery.fromServiceAccount?

serafdev avatar Sep 27 '18 22:09 serafdev