google-cloud-bigquery 1.51.0 → 1.52.0
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/bigquery/dataset.rb +3 -2
- data/lib/google/cloud/bigquery/service.rb +8 -5
- data/lib/google/cloud/bigquery/table/async_inserter.rb +2 -1
- data/lib/google/cloud/bigquery/table.rb +2 -1
- data/lib/google/cloud/bigquery/version.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac3a4c5ce3e1e0d3b9d59e2a69a1dfafa33eff759349a87bcdd5dbd3be07edd
|
4
|
+
data.tar.gz: 692bc17e85e95cff8c97c96f9935ae76128bbf1fd1595b9006e6f5b7ddb01eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d2e450455bad08939e2197b0e4e342d18cee00c2d2718d1c7ea778c666d4f2e50b0c5775a29e51ce2a8134d4fc35d771513d0c7e58009a27041e2f5c1776796
|
7
|
+
data.tar.gz: f0b09ae2d2c3644e17ad04ac070bb1b7ce588590075d529c032c067d51ec799520a8f75f4ba1cadedafbf2fe1e34b20ccc76f98c80d6ca90b916f59f6fba4677
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.52.0 (2025-03-10)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Update minimum Ruby version to 3.0 ([#29261](https://github.com/googleapis/google-cloud-ruby/issues/29261))
|
8
|
+
|
9
|
+
### 1.51.1 (2024-12-13)
|
10
|
+
|
11
|
+
#### Bug Fixes
|
12
|
+
|
13
|
+
* Allow inserts to a target dataset/table in another project ([#28097](https://github.com/googleapis/google-cloud-ruby/issues/28097))
|
14
|
+
|
3
15
|
### 1.51.0 (2024-12-04)
|
4
16
|
|
5
17
|
#### Features
|
@@ -2810,7 +2810,7 @@ module Google
|
|
2810
2810
|
ensure_service!
|
2811
2811
|
|
2812
2812
|
# Get table, don't use Dataset#table which handles NotFoundError
|
2813
|
-
gapi = service.
|
2813
|
+
gapi = service.get_project_table project_id, dataset_id, table_id, metadata_view: view
|
2814
2814
|
table = Table.from_gapi gapi, service, metadata_view: view
|
2815
2815
|
# Get the AsyncInserter from the table
|
2816
2816
|
table.insert_async skip_invalid: skip_invalid,
|
@@ -2865,7 +2865,8 @@ module Google
|
|
2865
2865
|
ensure_service!
|
2866
2866
|
gapi = service.insert_tabledata dataset_id, table_id, rows, skip_invalid: skip_invalid,
|
2867
2867
|
ignore_unknown: ignore_unknown,
|
2868
|
-
insert_ids: insert_ids
|
2868
|
+
insert_ids: insert_ids,
|
2869
|
+
project_id: project_id
|
2869
2870
|
InsertResponse.from_gapi rows, gapi
|
2870
2871
|
end
|
2871
2872
|
|
@@ -74,7 +74,7 @@ module Google
|
|
74
74
|
service.client_options.send_timeout_sec = timeout
|
75
75
|
service.request_options.retries = 0 # handle retries in #execute
|
76
76
|
service.request_options.header ||= {}
|
77
|
-
service.request_options.header["x-goog-api-client"] =
|
77
|
+
service.request_options.header["x-goog-api-client"] =
|
78
78
|
"gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Bigquery::VERSION}"
|
79
79
|
service.request_options.query ||= {}
|
80
80
|
service.request_options.query["prettyPrint"] = false
|
@@ -257,15 +257,17 @@ module Google
|
|
257
257
|
end
|
258
258
|
end
|
259
259
|
|
260
|
-
def insert_tabledata dataset_id, table_id, rows, insert_ids: nil, ignore_unknown: nil,
|
260
|
+
def insert_tabledata dataset_id, table_id, rows, insert_ids: nil, ignore_unknown: nil,
|
261
|
+
skip_invalid: nil, project_id: nil
|
261
262
|
json_rows = Array(rows).map { |row| Convert.to_json_row row }
|
262
263
|
insert_tabledata_json_rows dataset_id, table_id, json_rows, insert_ids: insert_ids,
|
263
264
|
ignore_unknown: ignore_unknown,
|
264
|
-
skip_invalid: skip_invalid
|
265
|
+
skip_invalid: skip_invalid,
|
266
|
+
project_id: project_id
|
265
267
|
end
|
266
268
|
|
267
269
|
def insert_tabledata_json_rows dataset_id, table_id, json_rows, insert_ids: nil, ignore_unknown: nil,
|
268
|
-
skip_invalid: nil
|
270
|
+
skip_invalid: nil, project_id: nil
|
269
271
|
rows_and_ids = Array(json_rows).zip Array(insert_ids)
|
270
272
|
insert_rows = rows_and_ids.map do |json_row, insert_id|
|
271
273
|
if insert_id == :skip
|
@@ -286,9 +288,10 @@ module Google
|
|
286
288
|
}.to_json
|
287
289
|
|
288
290
|
# The insertAll with insertId operation is considered idempotent
|
291
|
+
project_id ||= @project
|
289
292
|
execute backoff: true do
|
290
293
|
service.insert_all_table_data(
|
291
|
-
|
294
|
+
project_id, dataset_id, table_id, insert_req,
|
292
295
|
options: { skip_serialization: true }
|
293
296
|
)
|
294
297
|
end
|
@@ -294,7 +294,8 @@ module Google
|
|
294
294
|
json_rows,
|
295
295
|
skip_invalid: @skip_invalid,
|
296
296
|
ignore_unknown: @ignore_unknown,
|
297
|
-
insert_ids: insert_ids
|
297
|
+
insert_ids: insert_ids,
|
298
|
+
project_id: @table.project_id
|
298
299
|
|
299
300
|
result = Result.new InsertResponse.from_gapi(orig_rows, insert_resp)
|
300
301
|
rescue StandardError => e
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.52.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
8
8
|
- Chris Smith
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bigdecimal
|
@@ -174,7 +173,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-clo
|
|
174
173
|
licenses:
|
175
174
|
- Apache-2.0
|
176
175
|
metadata: {}
|
177
|
-
post_install_message:
|
178
176
|
rdoc_options: []
|
179
177
|
require_paths:
|
180
178
|
- lib
|
@@ -182,15 +180,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
180
|
requirements:
|
183
181
|
- - ">="
|
184
182
|
- !ruby/object:Gem::Version
|
185
|
-
version: '
|
183
|
+
version: '3.0'
|
186
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
185
|
requirements:
|
188
186
|
- - ">="
|
189
187
|
- !ruby/object:Gem::Version
|
190
188
|
version: '0'
|
191
189
|
requirements: []
|
192
|
-
rubygems_version: 3.5
|
193
|
-
signing_key:
|
190
|
+
rubygems_version: 3.6.5
|
194
191
|
specification_version: 4
|
195
192
|
summary: API Client library for Google BigQuery
|
196
193
|
test_files: []
|