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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0856b220a3d9c7b78dbffe45b35edf8e10b4fba
4
- data.tar.gz: 8ce985e90cfd9aa9b88c6cb7ec994d6e89184584
3
+ metadata.gz: 75ab420c5b9cd88e768004ba69eadbfee768c042
4
+ data.tar.gz: cce52b664a946840e4576cb5d66b95e1082252ae
5
5
  SHA512:
6
- metadata.gz: 02c3432b3494df8ca2f1901dda75488380574a7047228434a800d1578975ce9b6abb0bd65a0a5fc95285077d6963d19160241ed96e2b42d28cd30920e8c66230
7
- data.tar.gz: dd7aec6748550836b6195d5ee7d403ca126a52d194fe9a0a8e3bf7257bb7639931f3e6df7fde2908a1e8f610577b085ca30c50876a800040ff7b71aedb80e1f8
6
+ metadata.gz: 4af32432153efe97e5f304c2a4b20f97ab67af7c0c626ebdcd918665fb996e8946af03cfdc34f61036ec369deb769aeb4857af18876fc1a9448c86e8dd9b0ff6
7
+ data.tar.gz: 065b5243b83818a72cab0769a797dc2fa760d138eb464eb01040e99f37d553bf99b940909ea4546b7cf30854f745b493495304d858b1c985428d23f9df0850f0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.6 - 2016-06-15
2
+
3
+ * [maintenance] if `is_skip_job_result_check` is true, skip output_rows checking (thanks to @joker1007)
4
+
1
5
  ## 0.3.5 - 2016-06-13
2
6
 
3
7
  * [enhancement] retry backendError and internalError in waiting load job
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-bigquery"
3
- spec.version = "0.3.5"
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
- unless @task['is_skip_job_result_check']
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.5
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-13 00:00:00.000000000 Z
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