diff --git a/src/main/java/com/application/DB/DB.java b/src/main/java/com/application/DB/DB.java index d275e8f75b3ba3b241254d4d7004c71ec253407f..16db20756fb43d079b9bd71e439b5a2a22db3972 100644 --- a/src/main/java/com/application/DB/DB.java +++ b/src/main/java/com/application/DB/DB.java @@ -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 { diff --git a/target/classes/com/application/DB/DB.class b/target/classes/com/application/DB/DB.class index 358567fe506315da7ec92c447ff21861a8c7bb65..5fc50365604b4b0b0667010e8571d75202544d72 100644 Binary files a/target/classes/com/application/DB/DB.class and b/target/classes/com/application/DB/DB.class differ