embulk-output-bigquery 0.7.1 → 0.7.2

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: 4fba97c5f4a2935df80c4c4efb7f389c9818f221773c856b5f490f8e3e65c172
4
- data.tar.gz: e6949d104a822c586dc65180aff030af3da963a535a9e2ca3a9ac5b93f706527
3
+ metadata.gz: b3f1f3663f59942ba67caf8d3aa2785df824aaef5cc09de0bdcbadadd3642d81
4
+ data.tar.gz: 389b3111be5db9924f67fd2ce3d5d2c0afbe46d12c44c7df6ee5c95e04269c79
5
5
  SHA512:
6
- metadata.gz: 695c2c596d172eed178ddf34e12b985c7179cff73924d316641e77e4ee52465bb79d94d7e7c1141a7831859fe44d15cfd28b6f7aa0b409ce0d57626ac83abea9
7
- data.tar.gz: c48f7b6ce8df9141f2c716ffec0d0786fc5aa87cad034fffeb6df5055236cb5dff651f41f17580a6041b769cfd9198be36656909b87e1c844a694faef42616fa
6
+ metadata.gz: 5136502bb9003aa85f85c9c5d3b5c826f218476a7604f7d201160bf4931936f8f02b00fb77ea286b9ae8fc69b007b122a1f7f0707cec4a7b7d030d1d1771ce86
7
+ data.tar.gz: c16e57af1121e30e0bcfa187311d9f7652768a2bda79354202ce7bac92e9e5bf3bc33cdb2fbb95696f03653fa830f844f95bd01e200cb0b7d9732f2a3b989bad
@@ -9,8 +9,8 @@ jobs:
9
9
  strategy:
10
10
  matrix:
11
11
  jruby_version:
12
- - 9.3.10.0
13
- - 9.4.2.0
12
+ - 9.3.15.0
13
+ - 9.4.8.0
14
14
  fail-fast: false
15
15
  steps:
16
16
  - uses: actions/checkout@v4
@@ -19,24 +19,15 @@ jobs:
19
19
  with:
20
20
  java-version: 8
21
21
  distribution: "temurin"
22
- - uses: ruby/setup-ruby@v1
23
- with:
24
- ruby-version: 'jruby-${{ matrix.jruby_version }}'
25
- bundler-cache: true
26
- - name: show ruby version
27
- run: ruby -v
28
- - name: bundle install
29
- run: bundle install
22
+ - name: download jruby
23
+ run: "curl -L -o jruby.jar https://repo1.maven.org/maven2/org/jruby/jruby-complete/${{ matrix.jruby_version }}/jruby-complete-${{ matrix.jruby_version }}.jar"
30
24
  #
31
- # This step avoids the following error in the JRuby 9.4 test.
25
+ # For avoiding permission denied. install gems into `gems` directory
32
26
  #
33
- # Gem::LoadError: You have already activated rake 13.0.6,
34
- # but your Gemfile requires rake 13.1.0. Prepending
35
- # `bundle exec` to your command may solve this.
36
- #
37
- - name: install rake 13.1.0
38
- run: gem install rake -v 13.1.0
27
+ - name: bundle install
28
+ run: "env GEM_HOME=gems java -jar jruby.jar -S bundle install"
29
+
39
30
  - name: install embulk.jar
40
- run: "curl -L -o embulk.jar https://github.com/embulk/embulk/releases/download/v0.10.49/embulk-0.10.49.jar"
31
+ run: "curl -L -o embulk.jar https://github.com/embulk/embulk/releases/download/v0.11.4/embulk-0.11.4.jar"
41
32
  - name: rake test
42
- run: bundle exec env RUBYOPT="-r ./embulk.jar" rake test
33
+ run: 'env GEM_HOME=gems RUBYOPT="-r ./embulk.jar -r rubygems" java -jar jruby.jar -S bundle exec rake test'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.7.2 - 2024-07-21
2
+ * [maintenance] Fix GitHub Actions #166
3
+ * [maintenance] Fix gcs_client in order to load data using gcs_bucket parameter (Thanks to kashira202111) #164
4
+ * [maintenance] Prevent creating unnecessary tables. (Thanks to kashira202111) #148
5
+
1
6
  ## 0.7.1 - 2024-03-4
2
7
  * [enhancement] Support description of columns and tables (Thanks to @kyoshidajp and @fagai ) #142
3
8
  * [maintenance] Add missing GitHub Actions environment setting. #160
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org/'
2
2
 
3
3
  gemspec
4
- gem 'embulk', '= 0.10.49'
4
+ gem 'embulk', '= 0.11.4'
5
5
  gem 'embulk-parser-none'
6
6
  gem 'embulk-parser-jsonl'
7
7
  gem 'pry-nav'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-bigquery"
3
- spec.version = "0.7.1"
3
+ spec.version = "0.7.2"
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."
@@ -447,8 +447,8 @@ module Embulk
447
447
  end
448
448
 
449
449
  opts = {}
450
- Embulk.logger.debug { "embulk-output-bigquery: insert_table(#{@project}, #{dataset}, #{@location_for_log}, #{body}, #{opts})" }
451
- with_network_retry { client.insert_table(@project, dataset, body, **opts) }
450
+ Embulk.logger.debug { "embulk-output-bigquery: insert_table(#{@destination_project}, #{dataset}, #{@location_for_log}, #{body}, #{opts})" }
451
+ with_network_retry { client.insert_table(@destination_project, dataset, body, **opts) }
452
452
  rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
453
453
  if e.status_code == 409 && /Already Exists:/ =~ e.message
454
454
  # ignore 'Already Exists' error
@@ -457,7 +457,7 @@ module Embulk
457
457
 
458
458
  response = {status_code: e.status_code, message: e.message, error_class: e.class}
459
459
  Embulk.logger.error {
460
- "embulk-output-bigquery: insert_table(#{@project}, #{dataset}, #{@location_for_log}, #{body}, #{opts}), response:#{response}"
460
+ "embulk-output-bigquery: insert_table(#{@destination_project}, #{dataset}, #{@location_for_log}, #{body}, #{opts}), response:#{response}"
461
461
  }
462
462
  raise Error, "failed to create table #{@destination_project}:#{dataset}.#{table} in #{@location_for_log}, response:#{response}"
463
463
  end
@@ -48,7 +48,7 @@ module Embulk
48
48
  opts = {}
49
49
 
50
50
  Embulk.logger.debug { "embulk-output-bigquery: insert_temporary_bucket(#{@project}, #{body}, #{opts})" }
51
- with_network_retry { client.insert_bucket(@project, body, opts) }
51
+ with_network_retry { client.insert_bucket(@project, body, **opts) }
52
52
  rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
53
53
  if e.status_code == 409 && /conflict:/ =~ e.message
54
54
  # ignore 'Already Exists' error
@@ -81,7 +81,7 @@ module Embulk
81
81
 
82
82
  Embulk.logger.debug { "embulk-output-bigquery: insert_object(#{bucket}, #{body}, #{opts})" }
83
83
  # memo: gcs is strongly consistent for insert (read-after-write). ref: https://cloud.google.com/storage/docs/consistency
84
- with_network_retry { client.insert_object(bucket, body, opts) }
84
+ with_network_retry { client.insert_object(bucket, body, **opts) }
85
85
  rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
86
86
  response = {status_code: e.status_code, message: e.message, error_class: e.class}
87
87
  Embulk.logger.error {
@@ -114,7 +114,7 @@ module Embulk
114
114
  opts = {}
115
115
 
116
116
  Embulk.logger.debug { "embulk-output-bigquery: delete_object(#{bucket}, #{object}, #{opts})" }
117
- response = with_network_retry { client.delete_object(bucket, object, opts) }
117
+ response = with_network_retry { client.delete_object(bucket, object, **opts) }
118
118
  rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
119
119
  if e.status_code == 404 # ignore 'notFound' error
120
120
  return nil
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.7.1
4
+ version: 0.7.2
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: 2024-03-05 00:00:00.000000000 Z
12
+ date: 2024-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-apis-storage_v1