google-cloud-bigquery-storage-v1 0.7.0 → 0.9.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 +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb +63 -9
- data/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb +936 -0
- data/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb +55 -0
- data/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb +75 -0
- data/lib/google/cloud/bigquery/storage/v1/big_query_write.rb +56 -0
- data/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb +29 -0
- data/lib/google/cloud/bigquery/storage/v1/storage_pb.rb +86 -2
- data/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb +80 -1
- data/lib/google/cloud/bigquery/storage/v1/stream_pb.rb +24 -2
- data/lib/google/cloud/bigquery/storage/v1/table_pb.rb +62 -0
- data/lib/google/cloud/bigquery/storage/v1/version.rb +1 -1
- data/lib/google/cloud/bigquery/storage/v1.rb +1 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb +56 -0
- data/proto_docs/google/cloud/bigquery/storage/v1/storage.rb +244 -1
- data/proto_docs/google/cloud/bigquery/storage/v1/stream.rb +58 -0
- data/proto_docs/google/cloud/bigquery/storage/v1/table.rb +172 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +14 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a28a465df9bb4bfca7c1b116bd9f5bd0b722c3dd2c7aa7cea30093f185a4ab6f
|
4
|
+
data.tar.gz: e86896e574158ae89908fdb573b8b6dd03b5e0c74d1a11edf3685312794814f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d89f01e0feb45cccb4c949db695400a84fc63832312128b6d25088a4292380c9afe65048e4ea7bd48aed819ace234365b1e7d4e437ae8f44dc5560f649c5251
|
7
|
+
data.tar.gz: 3362bc84cee06136ba7bfa7e94f4331262230e359dfeac4b2e86711bdc7569901dda7f2b46eafa5f0464927ef46836ac72c87e4e8346a46e960f5fc22f8faf8e
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -221,6 +221,21 @@ module Google
|
|
221
221
|
#
|
222
222
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
223
223
|
#
|
224
|
+
# @example Basic example
|
225
|
+
# require "google/cloud/bigquery/storage/v1"
|
226
|
+
#
|
227
|
+
# # Create a client object. The client can be reused for multiple calls.
|
228
|
+
# client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
|
229
|
+
#
|
230
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
231
|
+
# request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new
|
232
|
+
#
|
233
|
+
# # Call the create_read_session method.
|
234
|
+
# result = client.create_read_session request
|
235
|
+
#
|
236
|
+
# # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession.
|
237
|
+
# p result
|
238
|
+
#
|
224
239
|
def create_read_session request, options = nil
|
225
240
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
226
241
|
|
@@ -238,9 +253,11 @@ module Google
|
|
238
253
|
gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION
|
239
254
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
240
255
|
|
241
|
-
header_params = {
|
242
|
-
|
243
|
-
|
256
|
+
header_params = {}
|
257
|
+
if request.read_session&.table
|
258
|
+
header_params["read_session.table"] = request.read_session.table
|
259
|
+
end
|
260
|
+
|
244
261
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
245
262
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
246
263
|
|
@@ -299,6 +316,24 @@ module Google
|
|
299
316
|
#
|
300
317
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
301
318
|
#
|
319
|
+
# @example Basic example
|
320
|
+
# require "google/cloud/bigquery/storage/v1"
|
321
|
+
#
|
322
|
+
# # Create a client object. The client can be reused for multiple calls.
|
323
|
+
# client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
|
324
|
+
#
|
325
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
326
|
+
# request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new
|
327
|
+
#
|
328
|
+
# # Call the read_rows method.
|
329
|
+
# result = client.read_rows request
|
330
|
+
#
|
331
|
+
# # The returned object is a streamed enumerable yielding elements of
|
332
|
+
# # type ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse.
|
333
|
+
# result.each do |response|
|
334
|
+
# p response
|
335
|
+
# end
|
336
|
+
#
|
302
337
|
def read_rows request, options = nil
|
303
338
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
304
339
|
|
@@ -316,9 +351,11 @@ module Google
|
|
316
351
|
gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION
|
317
352
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
318
353
|
|
319
|
-
header_params = {
|
320
|
-
|
321
|
-
|
354
|
+
header_params = {}
|
355
|
+
if request.read_stream
|
356
|
+
header_params["read_stream"] = request.read_stream
|
357
|
+
end
|
358
|
+
|
322
359
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
323
360
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
324
361
|
|
@@ -386,6 +423,21 @@ module Google
|
|
386
423
|
#
|
387
424
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
388
425
|
#
|
426
|
+
# @example Basic example
|
427
|
+
# require "google/cloud/bigquery/storage/v1"
|
428
|
+
#
|
429
|
+
# # Create a client object. The client can be reused for multiple calls.
|
430
|
+
# client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
|
431
|
+
#
|
432
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
433
|
+
# request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new
|
434
|
+
#
|
435
|
+
# # Call the split_read_stream method.
|
436
|
+
# result = client.split_read_stream request
|
437
|
+
#
|
438
|
+
# # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse.
|
439
|
+
# p result
|
440
|
+
#
|
389
441
|
def split_read_stream request, options = nil
|
390
442
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
391
443
|
|
@@ -403,9 +455,11 @@ module Google
|
|
403
455
|
gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION
|
404
456
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
405
457
|
|
406
|
-
header_params = {
|
407
|
-
|
408
|
-
|
458
|
+
header_params = {}
|
459
|
+
if request.name
|
460
|
+
header_params["name"] = request.name
|
461
|
+
end
|
462
|
+
|
409
463
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
410
464
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
411
465
|
|