Connection to BQ from inside DataPRoc
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,
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?