fluent-plugin-bigquery 3.3.0 → 3.3.1

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
  SHA256:
3
- metadata.gz: 2a8c0c40659fb474ce5c072f6aa8c9708c4f93755da5c2a763de19e9c3971b86
4
- data.tar.gz: 2c9366bf88b9c7a6673c765bb6d57e06e24aae6dd0a731458470d122905086f7
3
+ metadata.gz: 9b5175251ba70839fdc94328056d8737ec746a866e607ad1f485889dc2a4f3df
4
+ data.tar.gz: cbfb3fb3adfbf8958a9acd3283b350e532c9805ec712f8615537bba82734ee63
5
5
  SHA512:
6
- metadata.gz: 558e461e2c19e70e1748185962f33e3b827c95c293afad90737a8cd9da57fea28bf2109a0660e0f112e7ae9ea60dd64f063960017123fcf84cce434bb7883c8f
7
- data.tar.gz: aab29d009005ed142542397498da79a5b875dfae989c529aa102194fe142db7247cdf2034a774362cdb25603f0a000a23338306e859232e0981d33c8c928075c
6
+ metadata.gz: 55804c377380fa2c99e3a8e90bfe64b9ba64012df821d8b549e594e17f408f00c8ce00721261c413cbd4882c7e4b2e2be58ac2d4e3c061599ebf7716b7228d23
7
+ data.tar.gz: 20e8621b27f42115ce156ec933e361a45d3db057550d4858e0610de29ebfca5949ac1dff4d33e730a40e238531f5f92ec31d2ca23934a5be70a60a48df71b01d
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  module BigQueryPlugin
3
- VERSION = "3.3.0".freeze
3
+ VERSION = "3.3.1".freeze
4
4
  end
5
5
  end
@@ -144,8 +144,8 @@ module Fluent
144
144
  configuration.merge!({job_reference: {project_id: project, job_id: job_id}}) if job_id
145
145
 
146
146
  begin
147
- # Check table existance
148
- client.get_table(project, dataset, table_id)
147
+ # Check table existance and use its location for the result when the load jobs is duplicated.
148
+ table = client.get_table(project, dataset, table_id)
149
149
  rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
150
150
  if e.status_code == 404 && /Not Found: Table/i =~ e.message
151
151
  raise Fluent::BigQuery::UnRetryableError.new("Table is not found") unless @options[:auto_create_table]
@@ -167,7 +167,9 @@ module Fluent
167
167
  log.error "job.load API", project_id: project, dataset: dataset, table: table_id, code: e.status_code, message: e.message
168
168
 
169
169
  if job_id && e.status_code == 409 && e.message =~ /Job/ # duplicate load job
170
- return JobReference.new(chunk_id, chunk_id_hex, project, dataset, table_id, job_id)
170
+ # If a load job is duplicated, the API response may not be available to create the result.
171
+ # Therefore, we need to use the location of the table instead of the job's location to determine the result.
172
+ return JobReference.new(chunk_id, chunk_id_hex, project, dataset, table_id, job_id, table.location)
171
173
  end
172
174
 
173
175
  raise Fluent::BigQuery::Error.wrap(e)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoya Ito
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-11-22 00:00:00.000000000 Z
12
+ date: 2025-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake