google-cloud-bigquery-storage-v1 0.6.3 → 0.9.0

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: 9de5bdc6e2bb433b3937deeb7df241e3b56afda6e2c44aeb3c551124132cc4bf
4
- data.tar.gz: b6dc331ed903776ddb7c3a59ddc558603a10193e34305c46278f7e57883bc869
3
+ metadata.gz: 3321ce1006bfab7c7513dedf48c006e0f30a930a0b2bc5e1ae9dfe775dd276d4
4
+ data.tar.gz: dc10dc964e656decaa880405ec57ce0aa2c61edef92cf29f897b252d8a1ba815
5
5
  SHA512:
6
- metadata.gz: ff07ccb1cb7aef1abf61e4fc74ec34303f99f6bbb660d9e83d31fe997756fe520bf0190cc3abe3f4b18748ef6919025ad3bd4220093b90dd28d4f173c08c2acd
7
- data.tar.gz: bad37ed54b9af037aa4536603f9e4a325d0611ce3932fe8ee2b22bf106c547a4f75a9d5ff3e1025f4deac1b6c50d31ae9edac208e9c8cddd9017d6539b885e52
6
+ metadata.gz: fa4151bc016d5daea090d012dc307b73dc05dd4006c760b42e330ec0267c075dbc2aaefc989ad1dda861e967c94b1eafa38fc2fe62fb50f54ae8d2dd74cb5b60
7
+ data.tar.gz: ee14302ce6f9129d58897a79ac7e5d1eb6c13dd3a21c9d5e2edfbd062122653b2bdc4ac4d93b3ea23b0467b0e77c60658fffd16279b3000c9a6d57b6c8bbad69
@@ -180,7 +180,7 @@ module Google
180
180
  # limits are enforced based on the number of pre-filtered rows, so some
181
181
  # filters can lead to lopsided assignments.
182
182
  #
183
- # Read sessions automatically expire 24 hours after they are created and do
183
+ # Read sessions automatically expire 6 hours after they are created and do
184
184
  # not require manual clean-up by the caller.
185
185
  #
186
186
  # @overload create_read_session(request, options = nil)
@@ -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
- "read_session.table" => request.read_session.table
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
- "read_stream" => request.read_stream
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
- "name" => request.name
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