google-cloud-bigquery-storage-v1 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b07b9c4f3de0f8ef8bdba56a752c2395a4a8a66994ab61521410b3e99838e3e
4
- data.tar.gz: 31cef0791cce88a2ed20e8637c3c5d5e93987483c7e167415fe94f5b3d5f117a
3
+ metadata.gz: 58a0c1baa01e2035c83e5a26f8a24e2e5019366434cff0d26da8ffbd98f00759
4
+ data.tar.gz: e29a83123c54d3eee0560d57a671a5773e8bf7611675d919d20b164c6d107f32
5
5
  SHA512:
6
- metadata.gz: f401af0976b238c8af2303aed67b176c83f9d2f57377e8c242914e883df3b016648203f32aee4be5e93e99cf66d1119d09276d61666883034f3d5e3d98b5b041
7
- data.tar.gz: 686ac7ff79abc9a12dd4c2bf617e04982350f9fc66898abd52b944b65183315a36c9f78f8f7a208895ef39ff26e9ac8950914a7c04a959ecc4e4f287822780e2
6
+ metadata.gz: 381acaf8e118b0825ee281e0be78ed1b803e08faaa4ae98945b5e8718f427f9331f5988abc93895e970357f2634163d50a4631b41c6a2a646bc4f7aba3c5f6d6
7
+ data.tar.gz: 5e27d722046fbe05e26d1dab20ff58960f29b0f9d6bbf8d2687d8a156bb04ce06d9218a0418fc9e87bc07108d7c198ef336feb16279fe28336acf79250381db8
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-bigquery-storage-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Credentials}):
68
68
 
69
- 1. `BIGQUERY_STORAGE_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `BIGQUERY_STORAGE_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `BIGQUERY_STORAGE_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `BIGQUERY_STORAGE_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/bigquery/storage/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/bigquery/storage/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |co
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/bigquery/storage/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/bigquery/storage/v1"
34
34
 
35
35
  client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_read_session request
38
38
  ```
39
39
 
@@ -44,13 +44,12 @@ module Google
44
44
  # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
- # ## Example
47
+ # @example
48
48
  #
49
- # To modify the configuration for all BigQueryRead clients:
50
- #
51
- # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config|
52
- # config.timeout = 10.0
53
- # end
49
+ # # Modify the configuration for all BigQueryRead clients
50
+ # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
54
53
  #
55
54
  # @yield [config] Configure the Client client.
56
55
  # @yieldparam config [Client::Configuration]
@@ -70,26 +69,17 @@ module Google
70
69
 
71
70
  default_config.rpcs.create_read_session.timeout = 600.0
72
71
  default_config.rpcs.create_read_session.retry_policy = {
73
- initial_delay: 0.1,
74
- max_delay: 60.0,
75
- multiplier: 1.3,
76
- retry_codes: [4, 14]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
73
  }
78
74
 
79
75
  default_config.rpcs.read_rows.timeout = 86_400.0
80
76
  default_config.rpcs.read_rows.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [14]
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
85
78
  }
86
79
 
87
80
  default_config.rpcs.split_read_stream.timeout = 600.0
88
81
  default_config.rpcs.split_read_stream.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [4, 14]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
93
83
  }
94
84
 
95
85
  default_config
@@ -121,19 +111,15 @@ module Google
121
111
  ##
122
112
  # Create a new BigQueryRead client object.
123
113
  #
124
- # ## Examples
125
- #
126
- # To create a new BigQueryRead client with the default
127
- # configuration:
128
- #
129
- # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
114
+ # @example
130
115
  #
131
- # To create a new BigQueryRead client with a custom
132
- # configuration:
116
+ # # Create a client using the default configuration
117
+ # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
133
118
  #
134
- # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config|
135
- # config.timeout = 10.0
136
- # end
119
+ # # Create a client using a custom configuration
120
+ # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config|
121
+ # config.timeout = 10.0
122
+ # end
137
123
  #
138
124
  # @yield [config] Configure the BigQueryRead client.
139
125
  # @yieldparam config [Client::Configuration]
@@ -153,14 +139,13 @@ module Google
153
139
 
154
140
  # Create credentials
155
141
  credentials = @config.credentials
156
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
142
+ # Use self-signed JWT if the endpoint is unchanged from default,
157
143
  # but only if the default endpoint does not have a region prefix.
158
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
159
- @config.endpoint == Client.configure.endpoint &&
144
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
160
145
  !@config.endpoint.split(".").first.include?("-")
161
146
  credentials ||= Credentials.default scope: @config.scope,
162
147
  enable_self_signed_jwt: enable_self_signed_jwt
163
- if credentials.is_a?(String) || credentials.is_a?(Hash)
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
164
149
  credentials = Credentials.new credentials, scope: @config.scope
165
150
  end
166
151
  @quota_project_id = @config.quota_project
@@ -195,7 +180,7 @@ module Google
195
180
  # limits are enforced based on the number of pre-filtered rows, so some
196
181
  # filters can lead to lopsided assignments.
197
182
  #
198
- # 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
199
184
  # not require manual clean-up by the caller.
200
185
  #
201
186
  # @overload create_read_session(request, options = nil)
@@ -262,7 +247,9 @@ module Google
262
247
  options.apply_defaults timeout: @config.rpcs.create_read_session.timeout,
263
248
  metadata: metadata,
264
249
  retry_policy: @config.rpcs.create_read_session.retry_policy
265
- options.apply_defaults metadata: @config.metadata,
250
+
251
+ options.apply_defaults timeout: @config.timeout,
252
+ metadata: @config.metadata,
266
253
  retry_policy: @config.retry_policy
267
254
 
268
255
  @big_query_read_stub.call_rpc :create_read_session, request, options: options do |response, operation|
@@ -338,7 +325,9 @@ module Google
338
325
  options.apply_defaults timeout: @config.rpcs.read_rows.timeout,
339
326
  metadata: metadata,
340
327
  retry_policy: @config.rpcs.read_rows.retry_policy
341
- options.apply_defaults metadata: @config.metadata,
328
+
329
+ options.apply_defaults timeout: @config.timeout,
330
+ metadata: @config.metadata,
342
331
  retry_policy: @config.retry_policy
343
332
 
344
333
  @big_query_read_stub.call_rpc :read_rows, request, options: options do |response, operation|
@@ -423,7 +412,9 @@ module Google
423
412
  options.apply_defaults timeout: @config.rpcs.split_read_stream.timeout,
424
413
  metadata: metadata,
425
414
  retry_policy: @config.rpcs.split_read_stream.retry_policy
426
- options.apply_defaults metadata: @config.metadata,
415
+
416
+ options.apply_defaults timeout: @config.timeout,
417
+ metadata: @config.metadata,
427
418
  retry_policy: @config.retry_policy
428
419
 
429
420
  @big_query_read_stub.call_rpc :split_read_stream, request, options: options do |response, operation|
@@ -447,22 +438,21 @@ module Google
447
438
  # Configuration can be applied globally to all clients, or to a single client
448
439
  # on construction.
449
440
  #
450
- # # Examples
451
- #
452
- # To modify the global config, setting the timeout for create_read_session
453
- # to 20 seconds, and all remaining timeouts to 10 seconds:
454
- #
455
- # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config|
456
- # config.timeout = 10.0
457
- # config.rpcs.create_read_session.timeout = 20.0
458
- # end
459
- #
460
- # To apply the above configuration only to a new client:
461
- #
462
- # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config|
463
- # config.timeout = 10.0
464
- # config.rpcs.create_read_session.timeout = 20.0
465
- # end
441
+ # @example
442
+ #
443
+ # # Modify the global config, setting the timeout for
444
+ # # create_read_session to 20 seconds,
445
+ # # and all remaining timeouts to 10 seconds.
446
+ # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config|
447
+ # config.timeout = 10.0
448
+ # config.rpcs.create_read_session.timeout = 20.0
449
+ # end
450
+ #
451
+ # # Apply the above configuration only to a new client.
452
+ # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config|
453
+ # config.timeout = 10.0
454
+ # config.rpcs.create_read_session.timeout = 20.0
455
+ # end
466
456
  #
467
457
  # @!attribute [rw] endpoint
468
458
  # The hostname or hostname:port of the service endpoint.
@@ -30,7 +30,7 @@ module Google
30
30
  # The Read API can be used to read data from BigQuery.
31
31
  class Service
32
32
 
33
- include ::GRPC::GenericService
33
+ include GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -53,7 +53,7 @@ module Google
53
53
  # limits are enforced based on the number of pre-filtered rows, so some
54
54
  # filters can lead to lopsided assignments.
55
55
  #
56
- # Read sessions automatically expire 24 hours after they are created and do
56
+ # Read sessions automatically expire 6 hours after they are created and do
57
57
  # not require manual clean-up by the caller.
58
58
  rpc :CreateReadSession, ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Google::Cloud::Bigquery::Storage::V1::ReadSession
59
59
  # Reads rows from the stream in the format prescribed by the ReadSession.
@@ -18,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
18
18
  optional :table_modifiers, :message, 7, "google.cloud.bigquery.storage.v1.ReadSession.TableModifiers"
19
19
  optional :read_options, :message, 8, "google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions"
20
20
  repeated :streams, :message, 10, "google.cloud.bigquery.storage.v1.ReadStream"
21
+ optional :estimated_total_bytes_scanned, :int64, 12
21
22
  oneof :schema do
22
23
  optional :avro_schema, :message, 4, "google.cloud.bigquery.storage.v1.AvroSchema"
23
24
  optional :arrow_schema, :message, 5, "google.cloud.bigquery.storage.v1.ArrowSchema"
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module Storage
24
24
  module V1
25
- VERSION = "0.6.0"
25
+ VERSION = "0.7.0"
26
26
  end
27
27
  end
28
28
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -59,6 +59,11 @@ module Google
59
59
  # request_stream_count values *may* result in this list being unpopulated,
60
60
  # in that case, the user will need to use a List method to get the streams
61
61
  # instead, which is not yet available.
62
+ # @!attribute [r] estimated_total_bytes_scanned
63
+ # @return [::Integer]
64
+ # Output only. An estimate on the number of bytes this session will scan when
65
+ # all streams are completely consumed. This estimate is based on
66
+ # metadata from the table which might be incomplete or stale.
62
67
  class ReadSession
63
68
  include ::Google::Protobuf::MessageExts
64
69
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-storage-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-21 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.4'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.4'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement