embulk-output-bigquery 0.6.7 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ad08405eb0d6f4a7ff867c6252d393628437d55e03fe33ec2cc71f940926153
4
- data.tar.gz: 431ce1cf5298d5ec114a66191c9847f34fd554cc5de7c12fca8950a9e59538bf
3
+ metadata.gz: c07225701eda6aae9b1785a0204f22a7c19dcc6af5df3bb9186ff32029ca4a89
4
+ data.tar.gz: d611f3d7b023f49c9d35febe3bdb2caaab73feeeb7903cb22d432f9c0799b6fc
5
5
  SHA512:
6
- metadata.gz: c23e79e1b7e6d7b2af8455e97fd58bb4c4bc5e7b7fb1809bd49642294adfe644c27beca55177cff8427f5136532accae3973db1b000660c96f532e6d1cbfbc09
7
- data.tar.gz: 2d6ee9d0cf3504683bc2898df3edc246401a2cfd44db2f6311368903e89e09e9b31e746232005fdbbf43f039b91ca1fe1b4f190704ceee3e7a9778962de5be1b
6
+ metadata.gz: 99f64826852010f0f3473f70016d38fb0640d70e5ee713861e633834cb41d4b8f606214272a8a11c0612b6fadaa8905f581e226b952fac3eb06908a050dfa090
7
+ data.tar.gz: d6d3e7a11b7406710afa6fccca129809011465597d664be4d2b5cb55886711fa7751e43be1c91bee2d013a042402d6aa5f451096fc166e3f0cecb392ab4d13d3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.6.9 - 2023-03-16
2
+ * [enhancement] Add SSLException to retry job (thanks to @mzumi)
3
+
4
+ ## 0.6.8 - 2022-10-12
5
+ * [enhancement] Support JSON type (thanks to @civitaspo )
6
+ * [maintenance] Add an error message in order to retry (thanks to @mzumi)
7
+
1
8
  ## 0.6.7 - 2021-09-10
2
9
  * [enhancement] Add an expiration option of temporary table to clean up (thanks to @TKNGUE)
3
10
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-bigquery"
3
- spec.version = "0.6.7"
3
+ spec.version = "0.6.9"
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."
@@ -49,8 +49,14 @@ module Embulk
49
49
  retries = 0
50
50
  begin
51
51
  yield
52
- rescue ::Java::Java.net.SocketException, ::Java::Java.net.ConnectException => e
53
- if ['Broken pipe', 'Connection reset', 'Connection timed out'].select { |x| e.message.include?(x) }.empty?
52
+ rescue ::Java::Java.net.SocketException, ::Java::Java.net.ConnectException, ::Java::JavaxNetSsl::SSLException => e
53
+ retry_messages = [
54
+ 'Broken pipe',
55
+ 'Connection reset',
56
+ 'Connection timed out',
57
+ 'Connection or outbound has closed',
58
+ ]
59
+ if retry_messages.select { |x| e.message.include?(x) }.empty?
54
60
  raise e
55
61
  else
56
62
  if retries < @task['retries']
@@ -288,6 +288,10 @@ module Embulk
288
288
  Proc.new {|val|
289
289
  val
290
290
  }
291
+ when 'JSON'
292
+ Proc.new {|val|
293
+ val
294
+ }
291
295
  else
292
296
  raise NotSupportedType, "cannot take column type #{type} for json column"
293
297
  end
@@ -389,6 +389,12 @@ module Embulk
389
389
  assert_equal nil, converter.call(nil)
390
390
  assert_equal({'foo'=>'foo'}, converter.call({'foo'=>'foo'}))
391
391
  end
392
+
393
+ def test_json
394
+ converter = ValueConverterFactory.new(SCHEMA_TYPE, 'JSON').create_converter
395
+ assert_equal nil, converter.call(nil)
396
+ assert_equal({'foo'=>'foo'}, converter.call({'foo'=>'foo'}))
397
+ end
392
398
  end
393
399
 
394
400
  def test_strict_false
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.6.7
4
+ version: 0.6.9
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: 2021-09-10 00:00:00.000000000 Z
12
+ date: 2023-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: signet
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []
175
- rubygems_version: 3.0.3
175
+ rubygems_version: 3.3.7
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: Google BigQuery output plugin for Embulk