src/main/java/org/embulk/output/BigqueryWriter.java in embulk-output-bigquery-0.1.9 vs src/main/java/org/embulk/output/BigqueryWriter.java in embulk-output-bigquery-0.1.10

- old
+ new

@@ -70,11 +70,14 @@ this.jobStatusPollingInterval = builder.jobStatusPollingInterval; this.isSkipJobResultCheck = builder.isSkipJobResultCheck; this.ignoreUnknownValues = builder.ignoreUnknownValues; this.allowQuotedNewlines = builder.allowQuotedNewlines; - BigqueryAuthentication auth = new BigqueryAuthentication(builder.authMethod, builder.serviceAccountEmail, builder.p12KeyFilePath, builder.applicationName); + BigqueryAuthentication auth = new BigqueryAuthentication( + builder.authMethod, builder.serviceAccountEmail, builder.p12KeyFilePath, + builder.jsonKeyFilePath, builder.applicationName + ); this.bigQueryClient = auth.getBigqueryClient(); if (autoCreateTable) { this.tableSchema = createTableSchema(); } else { @@ -334,10 +337,11 @@ public static class Builder { private final String authMethod; private Optional<String> serviceAccountEmail; private Optional<String> p12KeyFilePath; + private Optional<String> jsonKeyFilePath; private String applicationName; private boolean autoCreateTable; private Optional<String> schemaPath; private String sourceFormat; private String fieldDelimiter; @@ -348,14 +352,16 @@ private int jobStatusPollingInterval; private boolean isSkipJobResultCheck; private boolean ignoreUnknownValues; private boolean allowQuotedNewlines; - public Builder(String authMethod, Optional<String> serviceAccountEmail, Optional<String> p12KeyFilePath, String applicationName) + public Builder(String authMethod, Optional<String> serviceAccountEmail, Optional<String> p12KeyFilePath, + Optional<String> jsonKeyFilePath, String applicationName) { this.authMethod = authMethod; this.serviceAccountEmail = serviceAccountEmail; this.p12KeyFilePath = p12KeyFilePath; + this.jsonKeyFilePath = jsonKeyFilePath; this.applicationName = applicationName; } public Builder setAutoCreateTable(boolean autoCreateTable) {