LineageClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.datacatalog.lineage_v1.services.lineage.transports.base.LineageTransport]] = None, client_options: Optional[Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Lineage is used to track data flows between assets over time. You can create LineageEvents to record lineage between multiple sources and a single target, for example, when table data is based on data from multiple tables.
Properties
transport
Returns the transport used by the client instance.
Type | Description |
LineageTransport | The transport used by the client instance. |
Methods
LineageClient
LineageClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.datacatalog.lineage_v1.services.lineage.transports.base.LineageTransport]] = None, client_options: Optional[Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the lineage client.
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str, LineageTransport]
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. It won't take effect if a |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
batch_search_link_processes
batch_search_link_processes(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.BatchSearchLinkProcessesRequest, dict]] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve information about LineageProcesses associated with specific links. LineageProcesses are transformation pipelines that result in data flowing from source to target assets. Links between assets represent this operation.
If you have specific link names, you can use this method to verify which LineageProcesses contribute to creating those links. See the xref_SearchLinks method for more information on how to retrieve link name.
You can retrieve the LineageProcess information in every project
where you have the datalineage.events.get
permission. The
project provided in the URL is used for Billing and Quota.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_batch_search_link_processes():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.BatchSearchLinkProcessesRequest(
parent="parent_value",
links=['links_value1', 'links_value2'],
)
# Make the request
page_result = client.batch_search_link_processes(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.BatchSearchLinkProcessesRequest, dict]
The request object. Request message for BatchSearchLinkProcesses. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.services.lineage.pagers.BatchSearchLinkProcessesPager | Response message for BatchSearchLinkProcesses. Iterating over this object will yield results and resolve additional pages automatically. |
cancel_operation
cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success
is not guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
common_billing_account_path
common_billing_account_path(billing_account: str)
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str)
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str)
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str)
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str)
Returns a fully-qualified project string.
create_lineage_event
create_lineage_event(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.CreateLineageEventRequest, dict]] = None, *, parent: Optional[str] = None, lineage_event: Optional[google.cloud.datacatalog.lineage_v1.types.lineage.LineageEvent] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new lineage event.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_create_lineage_event():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.CreateLineageEventRequest(
parent="parent_value",
)
# Make the request
response = client.create_lineage_event(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.CreateLineageEventRequest, dict]
The request object. Request message for CreateLineageEvent. |
parent |
str
Required. The name of the run that should own the lineage event. This corresponds to the |
lineage_event |
google.cloud.datacatalog.lineage_v1.types.LineageEvent
Required. The lineage event to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.LineageEvent | A lineage event represents an operation on assets. Within the operation, the data flows from the source to the target defined in the links field. |
create_process
create_process(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.CreateProcessRequest, dict]] = None, *, parent: Optional[str] = None, process: Optional[google.cloud.datacatalog.lineage_v1.types.lineage.Process] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new process.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_create_process():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.CreateProcessRequest(
parent="parent_value",
)
# Make the request
response = client.create_process(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.CreateProcessRequest, dict]
The request object. Request message for CreateProcess. |
parent |
str
Required. The name of the project and its location that should own the process. This corresponds to the |
process |
google.cloud.datacatalog.lineage_v1.types.Process
Required. The process to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Process | A process is the definition of a data transformation operation. |
create_run
create_run(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.CreateRunRequest, dict]] = None, *, parent: Optional[str] = None, run: Optional[google.cloud.datacatalog.lineage_v1.types.lineage.Run] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new run.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_create_run():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
run = lineage_v1.Run()
run.state = "ABORTED"
request = lineage_v1.CreateRunRequest(
parent="parent_value",
run=run,
)
# Make the request
response = client.create_run(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.CreateRunRequest, dict]
The request object. Request message for CreateRun. |
parent |
str
Required. The name of the process that should own the run. This corresponds to the |
run |
google.cloud.datacatalog.lineage_v1.types.Run
Required. The run to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Run | A lineage run represents an execution of a process that creates lineage events. |
delete_lineage_event
delete_lineage_event(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.DeleteLineageEventRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes the lineage event with the specified name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_delete_lineage_event():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.DeleteLineageEventRequest(
name="name_value",
)
# Make the request
client.delete_lineage_event(request=request)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.DeleteLineageEventRequest, dict]
The request object. Request message for DeleteLineageEvent. |
name |
str
Required. The name of the lineage event to delete. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_operation
delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes a long-running operation.
This method indicates that the client is no longer interested
in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_process
delete_process(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.DeleteProcessRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes the process with the specified name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_delete_process():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.DeleteProcessRequest(
name="name_value",
)
# Make the request
operation = client.delete_process(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.DeleteProcessRequest, dict]
The request object. Request message for DeleteProcess. |
name |
str
Required. The name of the process to delete. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_run
delete_run(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.DeleteRunRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes the run with the specified name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_delete_run():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.DeleteRunRequest(
name="name_value",
)
# Make the request
operation = client.delete_run(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.DeleteRunRequest, dict]
The request object. Request message for DeleteRun. |
name |
str
Required. The name of the run to delete. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
LineageClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Name | Description |
info |
dict
The service account private key info. |
Type | Description |
LineageClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
LineageClient | The constructed client. |
get_lineage_event
get_lineage_event(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.GetLineageEventRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Gets details of a specified lineage event.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_get_lineage_event():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.GetLineageEventRequest(
name="name_value",
)
# Make the request
response = client.get_lineage_event(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.GetLineageEventRequest, dict]
The request object. Request message for GetLineageEvent. |
name |
str
Required. The name of the lineage event to get. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.LineageEvent | A lineage event represents an operation on assets. Within the operation, the data flows from the source to the target defined in the links field. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: Optional[google.api_core.client_options.ClientOptions] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_operation
get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Gets the latest state of a long-running operation.
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| An Operation object. |
get_process
get_process(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.GetProcessRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Gets the details of the specified process.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_get_process():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.GetProcessRequest(
name="name_value",
)
# Make the request
response = client.get_process(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.GetProcessRequest, dict]
The request object. Request message for GetProcess. |
name |
str
Required. The name of the process to get. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Process | A process is the definition of a data transformation operation. |
get_run
get_run(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.GetRunRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Gets the details of the specified run.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_get_run():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.GetRunRequest(
name="name_value",
)
# Make the request
response = client.get_run(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.GetRunRequest, dict]
The request object. Request message for GetRun. |
name |
str
Required. The name of the run to get. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Run | A lineage run represents an execution of a process that creates lineage events. |
lineage_event_path
lineage_event_path(
project: str, location: str, process: str, run: str, lineage_event: str
)
Returns a fully-qualified lineage_event string.
list_lineage_events
list_lineage_events(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.ListLineageEventsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists lineage events in the given project and location. The list order is not defined.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_list_lineage_events():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.ListLineageEventsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_lineage_events(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.ListLineageEventsRequest, dict]
The request object. Request message for ListLineageEvents. |
parent |
str
Required. The name of the run that owns the collection of lineage events to get. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.services.lineage.pagers.ListLineageEventsPager | Response message for ListLineageEvents. Iterating over this object will yield results and resolve additional pages automatically. |
list_operations
list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists operations that match the specified filter in the request.
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
| Response message for ListOperations method. |
list_processes
list_processes(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.ListProcessesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
List processes in the given project and location. List order is descending by insertion time.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_list_processes():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.ListProcessesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_processes(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.ListProcessesRequest, dict]
The request object. Request message for ListProcesses. |
parent |
str
Required. The name of the project and its location that owns this collection of processes. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.services.lineage.pagers.ListProcessesPager | Response message for ListProcesses. Iterating over this object will yield results and resolve additional pages automatically. |
list_runs
list_runs(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.ListRunsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists runs in the given project and location. List order is
descending by start_time
.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_list_runs():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.ListRunsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_runs(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.ListRunsRequest, dict]
The request object. Request message for ListRuns. |
parent |
str
Required. The name of process that owns this collection of runs. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.services.lineage.pagers.ListRunsPager | Response message for ListRuns. Iterating over this object will yield results and resolve additional pages automatically. |
parse_common_billing_account_path
parse_common_billing_account_path(path: str)
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str)
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str)
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str)
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str)
Parse a project path into its component segments.
parse_lineage_event_path
parse_lineage_event_path(path: str)
Parses a lineage_event path into its component segments.
parse_process_path
parse_process_path(path: str)
Parses a process path into its component segments.
parse_run_path
parse_run_path(path: str)
Parses a run path into its component segments.
process_path
process_path(project: str, location: str, process: str)
Returns a fully-qualified process string.
run_path
run_path(project: str, location: str, process: str, run: str)
Returns a fully-qualified run string.
search_links
search_links(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.SearchLinksRequest, dict]] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve a list of links connected to a specific asset. Links represent the data flow between source (upstream) and target (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them.
You can retrieve links in every project where you have the
datalineage.events.get
permission. The project provided in
the URL is used for Billing and Quota.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_search_links():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
source = lineage_v1.EntityReference()
source.fully_qualified_name = "fully_qualified_name_value"
request = lineage_v1.SearchLinksRequest(
source=source,
parent="parent_value",
)
# Make the request
page_result = client.search_links(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.SearchLinksRequest, dict]
The request object. Request message for SearchLinks. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.services.lineage.pagers.SearchLinksPager | Response message for SearchLinks. Iterating over this object will yield results and resolve additional pages automatically. |
update_process
update_process(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.UpdateProcessRequest, dict]] = None, *, process: Optional[google.cloud.datacatalog.lineage_v1.types.lineage.Process] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Updates a process.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_update_process():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
request = lineage_v1.UpdateProcessRequest(
)
# Make the request
response = client.update_process(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.UpdateProcessRequest, dict]
The request object. Request message for UpdateProcess. |
process |
google.cloud.datacatalog.lineage_v1.types.Process
Required. The lineage process to update. The process's |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
The list of fields to update. Currently not used. The whole message is updated. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Process | A process is the definition of a data transformation operation. |
update_run
update_run(request: Optional[Union[google.cloud.datacatalog.lineage_v1.types.lineage.UpdateRunRequest, dict]] = None, *, run: Optional[google.cloud.datacatalog.lineage_v1.types.lineage.Run] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Updates a run.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud.datacatalog import lineage_v1
def sample_update_run():
# Create a client
client = lineage_v1.LineageClient()
# Initialize request argument(s)
run = lineage_v1.Run()
run.state = "ABORTED"
request = lineage_v1.UpdateRunRequest(
run=run,
)
# Make the request
response = client.update_run(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.datacatalog.lineage_v1.types.UpdateRunRequest, dict]
The request object. Request message for UpdateRun. |
run |
google.cloud.datacatalog.lineage_v1.types.Run
Required. The lineage run to update. The run's |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
The list of fields to update. Currently not used. The whole message is updated. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.cloud.datacatalog.lineage_v1.types.Run | A lineage run represents an execution of a process that creates lineage events. |