fluent-plugin-bigquery-storage-write 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9c0c40481459a0f1a4d3eab4c480e4f85436ff29cb3a4f5bff3527028b15ed
|
4
|
+
data.tar.gz: '00281c14d7ddf13d8aca6713a7745b2506c327f0040fef83fdaf171952bc4872'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1bfaef11494aefb3798c15e6e737e79053ba7bbbf8b418cae108bf17fa7e818a7ffacd2b1ba91637e9b1a051deaa2b391b9978777e276a923ca77ee12b5573c
|
7
|
+
data.tar.gz: b3c685a22f5efcc8cd7154e1f0f983ce306926d1d3390c3bf106a8cf7664cdee5e8997a84d709015671bd30cde9f6f08739706964a16b8453b6bb79230ad5a9f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-bigquery-storage-write (0.2.
|
4
|
+
fluent-plugin-bigquery-storage-write (0.2.2)
|
5
5
|
fluentd (>= 0.14.10, < 2)
|
6
6
|
google-api-client (>= 0.53.0)
|
7
7
|
google-cloud-bigquery-storage (>= 1.3.0)
|
@@ -11,7 +11,7 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (7.0.5)
|
14
|
+
activesupport (7.0.5.1)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
16
|
i18n (>= 1.6, < 2)
|
17
17
|
minitest (>= 5.1)
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
concurrent-ruby (1.2.2)
|
22
22
|
cool.io (1.7.1)
|
23
23
|
declarative (0.0.20)
|
24
|
-
faraday (2.7.
|
24
|
+
faraday (2.7.8)
|
25
25
|
faraday-net_http (>= 2.0, < 3.1)
|
26
26
|
ruby2_keywords (>= 0.0.4)
|
27
27
|
faraday-net_http (3.0.2)
|
@@ -71,7 +71,7 @@ GEM
|
|
71
71
|
google-cloud-bigquery-storage (1.3.0)
|
72
72
|
google-cloud-bigquery-storage-v1 (>= 0.8, < 2.a)
|
73
73
|
google-cloud-core (~> 1.6)
|
74
|
-
google-cloud-bigquery-storage-v1 (0.
|
74
|
+
google-cloud-bigquery-storage-v1 (0.20.0)
|
75
75
|
gapic-common (>= 0.19.1, < 2.a)
|
76
76
|
google-cloud-errors (~> 1.0)
|
77
77
|
google-cloud-core (1.6.0)
|
@@ -88,7 +88,7 @@ GEM
|
|
88
88
|
grpc (~> 1.27)
|
89
89
|
googleapis-common-protos-types (1.6.0)
|
90
90
|
google-protobuf (~> 3.14)
|
91
|
-
googleauth (1.
|
91
|
+
googleauth (1.6.0)
|
92
92
|
faraday (>= 0.17.3, < 3.a)
|
93
93
|
jwt (>= 1.4, < 3.0)
|
94
94
|
memoist (~> 0.16)
|
@@ -132,7 +132,7 @@ GEM
|
|
132
132
|
jwt (>= 1.5, < 3.0)
|
133
133
|
multi_json (~> 1.10)
|
134
134
|
strptime (0.2.5)
|
135
|
-
test-unit (3.6.
|
135
|
+
test-unit (3.6.1)
|
136
136
|
power_assert
|
137
137
|
thor (1.2.2)
|
138
138
|
trailblazer-option (0.1.2)
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-bigquery-storage-write"
|
6
|
-
spec.version = "0.2.
|
6
|
+
spec.version = "0.2.2"
|
7
7
|
spec.authors = ["gumigumi4f"]
|
8
8
|
spec.email = ["gumigumi4f@gmail.com"]
|
9
9
|
|
@@ -8,9 +8,14 @@ module Fluent
|
|
8
8
|
@options = options
|
9
9
|
@log = log
|
10
10
|
|
11
|
-
@
|
12
|
-
|
13
|
-
|
11
|
+
@base_append_rows_request = Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new(
|
12
|
+
write_stream: "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/_default",
|
13
|
+
proto_rows: Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData.new(
|
14
|
+
rows: Google::Cloud::Bigquery::Storage::V1::ProtoRows.new,
|
15
|
+
writer_schema: Google::Cloud::Bigquery::Storage::V1::ProtoSchema.new(
|
16
|
+
proto_descriptor: proto_descriptor
|
17
|
+
)
|
18
|
+
)
|
14
19
|
)
|
15
20
|
end
|
16
21
|
|
@@ -21,18 +26,9 @@ module Fluent
|
|
21
26
|
end
|
22
27
|
|
23
28
|
def insert(rows)
|
24
|
-
data =
|
25
|
-
|
26
|
-
|
27
|
-
proto_rows: Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData.new(
|
28
|
-
rows: Google::Cloud::Bigquery::Storage::V1::ProtoRows.new(
|
29
|
-
serialized_rows: rows
|
30
|
-
),
|
31
|
-
writer_schema: @write_schema
|
32
|
-
)
|
33
|
-
)
|
34
|
-
]
|
35
|
-
client.append_rows(data).map do |e|
|
29
|
+
data = Google::Protobuf.deep_copy(@base_append_rows_request)
|
30
|
+
data.proto_rows.rows.serialized_rows += rows
|
31
|
+
client.append_rows([data]).each do |e|
|
36
32
|
@log.trace(e)
|
37
33
|
end
|
38
34
|
end
|
@@ -85,8 +85,7 @@ module Fluent
|
|
85
85
|
email: @email,
|
86
86
|
json_key: @json_key)
|
87
87
|
rescue => e
|
88
|
-
|
89
|
-
raise Fluent::UnrecoverableError, e
|
88
|
+
raise Fluent::UnrecoverableError.new(e)
|
90
89
|
end
|
91
90
|
|
92
91
|
def format(tag, time, record)
|
@@ -111,6 +110,8 @@ module Fluent
|
|
111
110
|
end
|
112
111
|
|
113
112
|
@writer.insert(rows)
|
113
|
+
rescue Google::Protobuf::ParseError => e
|
114
|
+
raise Fluent::UnrecoverableError.new(e)
|
114
115
|
end
|
115
116
|
|
116
117
|
def multi_workers_ready?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-bigquery-storage-write
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gumigumi4f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
187
|
+
rubygems_version: 3.1.6
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Fluentd output plugin to insert data into BigQuery through storage write
|