google-cloud-bigquery-storage-v1 0.5.0 → 0.6.3
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/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb +1 -0
- data/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb +42 -52
- data/lib/google/cloud/bigquery/storage/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb +3 -0
- data/proto_docs/google/cloud/bigquery/storage/v1/stream.rb +5 -6
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9de5bdc6e2bb433b3937deeb7df241e3b56afda6e2c44aeb3c551124132cc4bf
|
4
|
+
data.tar.gz: b6dc331ed903776ddb7c3a59ddc558603a10193e34305c46278f7e57883bc869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff07ccb1cb7aef1abf61e4fc74ec34303f99f6bbb660d9e83d31fe997756fe520bf0190cc3abe3f4b18748ef6919025ad3bd4220093b90dd28d4f173c08c2acd
|
7
|
+
data.tar.gz: bad37ed54b9af037aa4536603f9e4a325d0611ce3932fe8ee2b22bf106c547a4f75a9d5ff3e1025f4deac1b6c50d31ae9edac208e9c8cddd9017d6539b885e52
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
86
|
-
environment
|
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
|
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 =
|
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
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
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
|
-
#
|
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
|
-
#
|
132
|
-
#
|
116
|
+
# # Create a client using the default configuration
|
117
|
+
# client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new
|
133
118
|
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
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
|
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.
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
#
|
451
|
-
#
|
452
|
-
#
|
453
|
-
# to 20 seconds,
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
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.
|
@@ -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
|
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
|
@@ -29,10 +29,9 @@ module Google
|
|
29
29
|
# `projects/{project_id}/locations/{location}/sessions/{session_id}`.
|
30
30
|
# @!attribute [r] expire_time
|
31
31
|
# @return [::Google::Protobuf::Timestamp]
|
32
|
-
# Output only. Time at which the session becomes invalid. After this time,
|
33
|
-
#
|
34
|
-
#
|
35
|
-
# updated.
|
32
|
+
# Output only. Time at which the session becomes invalid. After this time, subsequent
|
33
|
+
# requests to read this Session will return errors. The expire_time is
|
34
|
+
# automatically assigned and currently cannot be specified or updated.
|
36
35
|
# @!attribute [rw] data_format
|
37
36
|
# @return [::Google::Cloud::Bigquery::Storage::V1::DataFormat]
|
38
37
|
# Immutable. Data format of the output data.
|
@@ -48,8 +47,7 @@ module Google
|
|
48
47
|
# `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`
|
49
48
|
# @!attribute [rw] table_modifiers
|
50
49
|
# @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableModifiers]
|
51
|
-
# Optional. Any modifiers which are applied when reading from the specified
|
52
|
-
# table.
|
50
|
+
# Optional. Any modifiers which are applied when reading from the specified table.
|
53
51
|
# @!attribute [rw] read_options
|
54
52
|
# @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions]
|
55
53
|
# Optional. Read options for this session (e.g. column selection, filters).
|
@@ -95,6 +93,7 @@ module Google
|
|
95
93
|
# Restricted to a maximum length for 1 MB.
|
96
94
|
# @!attribute [rw] arrow_serialization_options
|
97
95
|
# @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions]
|
96
|
+
# Optional. Options specific to the Apache Arrow output format.
|
98
97
|
class TableReadOptions
|
99
98
|
include ::Google::Protobuf::MessageExts
|
100
99
|
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.
|
4
|
+
version: 0.6.3
|
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-
|
11
|
+
date: 2021-08-11 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:
|
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:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
208
|
- !ruby/object:Gem::Version
|
203
209
|
version: '0'
|
204
210
|
requirements: []
|
205
|
-
rubygems_version: 3.2.
|
211
|
+
rubygems_version: 3.2.17
|
206
212
|
signing_key:
|
207
213
|
specification_version: 4
|
208
214
|
summary: API Client library for the BigQuery Storage V1 API
|