Skip to content
Snippets Groups Projects
Commit c4df1c96 authored by Eilert Tunheim's avatar Eilert Tunheim
Browse files

Updated filepath for json key-file

parent 85ab412e
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ import java.io.FileInputStream;
public class DB {
private static GoogleCredentials getCredentials() throws Exception {
File credentialsPath = new File(".\\src\\main\\resources\\com.application\\sf-drying-optimization-1e234ad2b0f4.json");
File credentialsPath = new File("./src/main/resources/com.application/sf-drying-optimization-1e234ad2b0f4.json");
// Load credentials from JSON key file. If you can't set the GOOGLE_APPLICATION_CREDENTIALS
// environment variable, you can explicitly load the credentials file to construct the
......@@ -34,11 +34,10 @@ public class DB {
// this is the interface to our BigQuery instance that
// we use to execute jobs on
private static BigQuery getBuilder() throws Exception {
BigQuery bigquery = BigQueryOptions.newBuilder().
return BigQueryOptions.newBuilder().
setCredentials(getCredentials()).
setProjectId("sf-drying-optimization")
.build().getService();
return bigquery;
}
public static void getFromExistingTable() throws Exception {
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment