google-cloud-data_catalog-lineage-v1 0.3.0 → 0.5.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: 6731f748576acef54cf6d3d7b6c04e6af47f0fdaf3ac46d6f52fe57763cc1a3d
4
- data.tar.gz: e6673bda380d6cfc0a9ec12ee7617142a9bf22b7347f5eeb8176005b001f31b9
3
+ metadata.gz: 680f57dd5d9d3b576e45e0a08ab1e964b84ddb02559afcf943242a36326d912c
4
+ data.tar.gz: 111cf762ac6a37e5a812f0c2a17b073dafdc8d0e19e2cc56f017ac9e546fc573
5
5
  SHA512:
6
- metadata.gz: f03a8b05a357264478239cb7f192479320fd01102c7d99ed555e26e01154c3f730667d879d8561ccf7d386f4e0ccfbbf198de58fa87c57b34f7935ffa76c3610
7
- data.tar.gz: '078f672c14961918f2a2d0d259f6648f690adefeb495257ca08fb386a7a2f78e44ef8ef72040baaa40af830f8c9da9d5e14bca284ac2a07f4cc2f10a3007d7af'
6
+ metadata.gz: 7ca8b4fbb1f8c90ac7ad6e3307096244155fefec08148b248d50b18973420e9db369681588f4635f1178cab130e3b0330708c74e14cc12f5e9cfd7fd755d9fb6
7
+ data.tar.gz: f71eaeb6f492f9abc266bcbd86bf480c72bdeb75daf5866df835ef1112f76121a0043765b877f532e074da633d54528f90d7bdd01c1a9f19c3e38c630c28b111
data/README.md CHANGED
@@ -33,8 +33,8 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/data_catalog/lineage/v1"
34
34
 
35
35
  client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
36
- request = ::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest.new # (request fields as keyword arguments...)
37
- response = client.create_process request
36
+ request = ::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventRequest.new # (request fields as keyword arguments...)
37
+ response = client.process_open_lineage_run_event request
38
38
  ```
39
39
 
40
40
  View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-data_catalog-lineage-v1/latest)
@@ -153,7 +153,8 @@ module Google
153
153
  credentials: credentials,
154
154
  endpoint: @config.endpoint,
155
155
  channel_args: @config.channel_args,
156
- interceptors: @config.interceptors
156
+ interceptors: @config.interceptors,
157
+ channel_pool_config: @config.channel_pool
157
158
  )
158
159
  end
159
160
 
@@ -166,6 +167,102 @@ module Google
166
167
 
167
168
  # Service calls
168
169
 
170
+ ##
171
+ # Creates new lineage events together with their parents: process and run.
172
+ # Updates the process and run if they already exist.
173
+ # Mapped from Open Lineage specification:
174
+ # https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json.
175
+ #
176
+ # @overload process_open_lineage_run_event(request, options = nil)
177
+ # Pass arguments to `process_open_lineage_run_event` via a request object, either of type
178
+ # {::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventRequest} or an equivalent Hash.
179
+ #
180
+ # @param request [::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventRequest, ::Hash]
181
+ # A request object representing the call parameters. Required. To specify no
182
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
183
+ # @param options [::Gapic::CallOptions, ::Hash]
184
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
185
+ #
186
+ # @overload process_open_lineage_run_event(parent: nil, open_lineage: nil, request_id: nil)
187
+ # Pass arguments to `process_open_lineage_run_event` via keyword arguments. Note that at
188
+ # least one keyword argument is required. To specify no parameters, or to keep all
189
+ # the default parameter values, pass an empty Hash as a request object (see above).
190
+ #
191
+ # @param parent [::String]
192
+ # Required. The name of the project and its location that should own the
193
+ # process, run, and lineage event.
194
+ # @param open_lineage [::Google::Protobuf::Struct, ::Hash]
195
+ # Required. OpenLineage message following OpenLineage format:
196
+ # https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json
197
+ # @param request_id [::String]
198
+ # A unique identifier for this request. Restricted to 36 ASCII characters.
199
+ # A random UUID is recommended. This request is idempotent only if a
200
+ # `request_id` is provided.
201
+ #
202
+ # @yield [response, operation] Access the result along with the RPC operation
203
+ # @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventResponse]
204
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
205
+ #
206
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventResponse]
207
+ #
208
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
209
+ #
210
+ # @example Basic example
211
+ # require "google/cloud/data_catalog/lineage/v1"
212
+ #
213
+ # # Create a client object. The client can be reused for multiple calls.
214
+ # client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
215
+ #
216
+ # # Create a request. To set request fields, pass in keyword arguments.
217
+ # request = Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventRequest.new
218
+ #
219
+ # # Call the process_open_lineage_run_event method.
220
+ # result = client.process_open_lineage_run_event request
221
+ #
222
+ # # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventResponse.
223
+ # p result
224
+ #
225
+ def process_open_lineage_run_event request, options = nil
226
+ raise ::ArgumentError, "request must be provided" if request.nil?
227
+
228
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::ProcessOpenLineageRunEventRequest
229
+
230
+ # Converts hash and nil to an options object
231
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
232
+
233
+ # Customize the options with defaults
234
+ metadata = @config.rpcs.process_open_lineage_run_event.metadata.to_h
235
+
236
+ # Set x-goog-api-client and x-goog-user-project headers
237
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
239
+ gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
240
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
+
242
+ header_params = {}
243
+ if request.parent
244
+ header_params["parent"] = request.parent
245
+ end
246
+
247
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
248
+ metadata[:"x-goog-request-params"] ||= request_params_header
249
+
250
+ options.apply_defaults timeout: @config.rpcs.process_open_lineage_run_event.timeout,
251
+ metadata: metadata,
252
+ retry_policy: @config.rpcs.process_open_lineage_run_event.retry_policy
253
+
254
+ options.apply_defaults timeout: @config.timeout,
255
+ metadata: @config.metadata,
256
+ retry_policy: @config.retry_policy
257
+
258
+ @lineage_stub.call_rpc :process_open_lineage_run_event, request, options: options do |response, operation|
259
+ yield response, operation if block_given?
260
+ return response
261
+ end
262
+ rescue ::GRPC::BadStatus => e
263
+ raise ::Google::Cloud::Error.from_error(e)
264
+ end
265
+
169
266
  ##
170
267
  # Creates a new process.
171
268
  #
@@ -738,7 +835,7 @@ module Google
738
835
  # @param options [::Gapic::CallOptions, ::Hash]
739
836
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
740
837
  #
741
- # @overload update_run(run: nil, update_mask: nil)
838
+ # @overload update_run(run: nil, update_mask: nil, allow_missing: nil)
742
839
  # Pass arguments to `update_run` via keyword arguments. Note that at
743
840
  # least one keyword argument is required. To specify no parameters, or to keep all
744
841
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -753,6 +850,8 @@ module Google
753
850
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
754
851
  # The list of fields to update. Currently not used. The whole message is
755
852
  # updated.
853
+ # @param allow_missing [::Boolean]
854
+ # If set to true and the run is not found, the request creates it.
756
855
  #
757
856
  # @yield [response, operation] Access the result along with the RPC operation
758
857
  # @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Run]
@@ -1496,7 +1595,7 @@ module Google
1496
1595
  # the default parameter values, pass an empty Hash as a request object (see above).
1497
1596
  #
1498
1597
  # @param parent [::String]
1499
- # Required. The project and location you want search in the format `projects/*/locations/*`
1598
+ # Required. The project and location you want search in.
1500
1599
  # @param source [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
1501
1600
  # Optional. Send asset information in the **source** field to retrieve all
1502
1601
  # links that lead from the specified asset to downstream assets.
@@ -1618,7 +1717,7 @@ module Google
1618
1717
  # the default parameter values, pass an empty Hash as a request object (see above).
1619
1718
  #
1620
1719
  # @param parent [::String]
1621
- # Required. The project and location you want search in the format `projects/*/locations/*`
1720
+ # Required. The project and location where you want to search.
1622
1721
  # @param links [::Array<::String>]
1623
1722
  # Required. An array of links to check for their associated LineageProcesses.
1624
1723
  #
@@ -1723,17 +1822,17 @@ module Google
1723
1822
  # @example
1724
1823
  #
1725
1824
  # # Modify the global config, setting the timeout for
1726
- # # create_process to 20 seconds,
1825
+ # # process_open_lineage_run_event to 20 seconds,
1727
1826
  # # and all remaining timeouts to 10 seconds.
1728
1827
  # ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.configure do |config|
1729
1828
  # config.timeout = 10.0
1730
- # config.rpcs.create_process.timeout = 20.0
1829
+ # config.rpcs.process_open_lineage_run_event.timeout = 20.0
1731
1830
  # end
1732
1831
  #
1733
1832
  # # Apply the above configuration only to a new client.
1734
1833
  # client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new do |config|
1735
1834
  # config.timeout = 10.0
1736
- # config.rpcs.create_process.timeout = 20.0
1835
+ # config.rpcs.process_open_lineage_run_event.timeout = 20.0
1737
1836
  # end
1738
1837
  #
1739
1838
  # @!attribute [rw] endpoint
@@ -1826,6 +1925,14 @@ module Google
1826
1925
  end
1827
1926
  end
1828
1927
 
1928
+ ##
1929
+ # Configuration for the channel pool
1930
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1931
+ #
1932
+ def channel_pool
1933
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1934
+ end
1935
+
1829
1936
  ##
1830
1937
  # Configuration RPC class for the Lineage API.
1831
1938
  #
@@ -1844,6 +1951,11 @@ module Google
1844
1951
  # trigger a retry.
1845
1952
  #
1846
1953
  class Rpcs
1954
+ ##
1955
+ # RPC-specific configuration for `process_open_lineage_run_event`
1956
+ # @return [::Gapic::Config::Method]
1957
+ #
1958
+ attr_reader :process_open_lineage_run_event
1847
1959
  ##
1848
1960
  # RPC-specific configuration for `create_process`
1849
1961
  # @return [::Gapic::Config::Method]
@@ -1927,6 +2039,8 @@ module Google
1927
2039
 
1928
2040
  # @private
1929
2041
  def initialize parent_rpcs = nil
2042
+ process_open_lineage_run_event_config = parent_rpcs.process_open_lineage_run_event if parent_rpcs.respond_to? :process_open_lineage_run_event
2043
+ @process_open_lineage_run_event = ::Gapic::Config::Method.new process_open_lineage_run_event_config
1930
2044
  create_process_config = parent_rpcs.create_process if parent_rpcs.respond_to? :create_process
1931
2045
  @create_process = ::Gapic::Config::Method.new create_process_config
1932
2046
  update_process_config = parent_rpcs.update_process if parent_rpcs.respond_to? :update_process
@@ -94,7 +94,8 @@ module Google
94
94
  credentials: credentials,
95
95
  endpoint: @config.endpoint,
96
96
  channel_args: @config.channel_args,
97
- interceptors: @config.interceptors
97
+ interceptors: @config.interceptors,
98
+ channel_pool_config: @config.channel_pool
98
99
  )
99
100
 
100
101
  # Used by an LRO wrapper for some methods of this service
@@ -702,6 +703,14 @@ module Google
702
703
  end
703
704
  end
704
705
 
706
+ ##
707
+ # Configuration for the channel pool
708
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
709
+ #
710
+ def channel_pool
711
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
712
+ end
713
+
705
714
  ##
706
715
  # Configuration RPC class for the Operations API.
707
716
  #