embulk-output-bigquery 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/embulk-output-bigquery.gemspec +1 -1
- data/lib/embulk/output/bigquery.rb +3 -1
- data/lib/embulk/output/bigquery/bigquery_client.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ab420c5b9cd88e768004ba69eadbfee768c042
|
4
|
+
data.tar.gz: cce52b664a946840e4576cb5d66b95e1082252ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4af32432153efe97e5f304c2a4b20f97ab67af7c0c626ebdcd918665fb996e8946af03cfdc34f61036ec369deb769aeb4857af18876fc1a9448c86e8dd9b0ff6
|
7
|
+
data.tar.gz: 065b5243b83818a72cab0769a797dc2fa760d138eb464eb01040e99f37d553bf99b940909ea4546b7cf30854f745b493495304d858b1c985428d23f9df0850f0
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-bigquery"
|
3
|
-
spec.version = "0.3.
|
3
|
+
spec.version = "0.3.6"
|
4
4
|
spec.authors = ["Satoshi Akama", "Naotoshi Seo"]
|
5
5
|
spec.summary = "Google BigQuery output plugin for Embulk"
|
6
6
|
spec.description = "Embulk plugin that insert records to Google BigQuery."
|
@@ -239,6 +239,8 @@ module Embulk
|
|
239
239
|
|
240
240
|
def self.transaction_report(task, responses)
|
241
241
|
num_input_rows = file_writers.empty? ? 0 : file_writers.map(&:num_rows).inject(:+)
|
242
|
+
return {'num_input_rows' => num_input_rows} if task['is_skip_job_result_check']
|
243
|
+
|
242
244
|
num_response_rows = responses.inject(0) do |sum, response|
|
243
245
|
sum + (response ? response.statistics.load.output_rows.to_i : 0)
|
244
246
|
end
|
@@ -336,7 +338,7 @@ module Embulk
|
|
336
338
|
transaction_report = self.transaction_report(task, responses)
|
337
339
|
Embulk.logger.info { "embulk-output-bigquery: transaction_report: #{transaction_report.to_json}" }
|
338
340
|
|
339
|
-
if task['abort_on_error']
|
341
|
+
if task['abort_on_error'] && !task['is_skip_job_result_check']
|
340
342
|
if transaction_report['num_input_rows'] != transaction_report['num_output_rows']
|
341
343
|
raise Error, "ABORT: `num_input_rows (#{transaction_report['num_input_rows']})` and " \
|
342
344
|
"`num_output_rows (#{transaction_report['num_output_rows']})` does not match"
|
@@ -197,7 +197,9 @@ module Embulk
|
|
197
197
|
}
|
198
198
|
Embulk.logger.debug { "embulk-output-bigquery: insert_job(#{@project}, #{body}, #{opts})" }
|
199
199
|
response = client.insert_job(@project, body, opts)
|
200
|
-
|
200
|
+
if @task['is_skip_job_result_check']
|
201
|
+
response
|
202
|
+
else
|
201
203
|
response = wait_load('Load', response)
|
202
204
|
end
|
203
205
|
rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Akama
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-api-client
|