Class LineageClient (0.28.0)

GitHub RepositoryProduct Reference

Service Description: 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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = "parent-995424086";
   Struct openLineage = Struct.newBuilder().build();
   ProcessOpenLineageRunEventResponse response =
       lineageClient.processOpenLineageRunEvent(parent, openLineage);
 }
 

Note: close() needs to be called on the LineageClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
MethodDescriptionMethod Variants

ProcessOpenLineageRunEvent

Creates new lineage events together with their parents: process and run. Updates the process and run if they already exist. Mapped from Open Lineage specification: https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • processOpenLineageRunEvent(ProcessOpenLineageRunEventRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • processOpenLineageRunEvent(String parent, Struct openLineage)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • processOpenLineageRunEventCallable()

CreateProcess

Creates a new process.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createProcess(CreateProcessRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createProcess(LocationName parent, Process process)

  • createProcess(String parent, Process process)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createProcessCallable()

UpdateProcess

Updates a process.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateProcess(UpdateProcessRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateProcess(Process process, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateProcessCallable()

GetProcess

Gets the details of the specified process.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getProcess(GetProcessRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getProcess(ProcessName name)

  • getProcess(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getProcessCallable()

ListProcesses

List processes in the given project and location. List order is descending by insertion time.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listProcesses(ListProcessesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listProcesses(LocationName parent)

  • listProcesses(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listProcessesPagedCallable()

  • listProcessesCallable()

DeleteProcess

Deletes the process with the specified name.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteProcessAsync(DeleteProcessRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteProcessAsync(ProcessName name)

  • deleteProcessAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteProcessOperationCallable()

  • deleteProcessCallable()

CreateRun

Creates a new run.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRun(CreateRunRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createRun(ProcessName parent, Run run)

  • createRun(String parent, Run run)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRunCallable()

UpdateRun

Updates a run.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRun(UpdateRunRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateRun(Run run, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRunCallable()

GetRun

Gets the details of the specified run.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRun(GetRunRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRun(RunName name)

  • getRun(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRunCallable()

ListRuns

Lists runs in the given project and location. List order is descending by start_time.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRuns(ListRunsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRuns(ProcessName parent)

  • listRuns(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRunsPagedCallable()

  • listRunsCallable()

DeleteRun

Deletes the run with the specified name.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRunAsync(DeleteRunRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteRunAsync(RunName name)

  • deleteRunAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRunOperationCallable()

  • deleteRunCallable()

CreateLineageEvent

Creates a new lineage event.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createLineageEvent(CreateLineageEventRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createLineageEvent(RunName parent, LineageEvent lineageEvent)

  • createLineageEvent(String parent, LineageEvent lineageEvent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createLineageEventCallable()

GetLineageEvent

Gets details of a specified lineage event.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLineageEvent(GetLineageEventRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getLineageEvent(LineageEventName name)

  • getLineageEvent(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLineageEventCallable()

ListLineageEvents

Lists lineage events in the given project and location. The list order is not defined.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLineageEvents(ListLineageEventsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listLineageEvents(RunName parent)

  • listLineageEvents(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLineageEventsPagedCallable()

  • listLineageEventsCallable()

DeleteLineageEvent

Deletes the lineage event with the specified name.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteLineageEvent(DeleteLineageEventRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteLineageEvent(LineageEventName name)

  • deleteLineageEvent(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteLineageEventCallable()

SearchLinks

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • searchLinks(SearchLinksRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • searchLinksPagedCallable()

  • searchLinksCallable()

BatchSearchLinkProcesses

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 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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchSearchLinkProcesses(BatchSearchLinkProcessesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchSearchLinkProcessesPagedCallable()

  • batchSearchLinkProcessesCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of LineageSettings to create(). For example:

To customize credentials:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 LineageSettings lineageSettings =
     LineageSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 LineageClient lineageClient = LineageClient.create(lineageSettings);
 

To customize the endpoint:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 LineageSettings lineageSettings = LineageSettings.newBuilder().setEndpoint(myEndpoint).build();
 LineageClient lineageClient = LineageClient.create(lineageSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 LineageSettings lineageSettings = LineageSettings.newHttpJsonBuilder().build();
 LineageClient lineageClient = LineageClient.create(lineageSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > LineageClient

Static Methods

create()

public static final LineageClient create()

Constructs an instance of LineageClient with default settings.

Returns
TypeDescription
LineageClient
Exceptions
TypeDescription
IOException

create(LineageSettings settings)

public static final LineageClient create(LineageSettings settings)

Constructs an instance of LineageClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsLineageSettings
Returns
TypeDescription
LineageClient
Exceptions
TypeDescription
IOException

create(LineageStub stub)

public static final LineageClient create(LineageStub stub)

Constructs an instance of LineageClient, using the given stub for making calls. This is for advanced usage - prefer using create(LineageSettings).

Parameter
NameDescription
stubLineageStub
Returns
TypeDescription
LineageClient

Constructors

LineageClient(LineageSettings settings)

protected LineageClient(LineageSettings settings)

Constructs an instance of LineageClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsLineageSettings

LineageClient(LineageStub stub)

protected LineageClient(LineageStub stub)
Parameter
NameDescription
stubLineageStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

batchSearchLinkProcesses(BatchSearchLinkProcessesRequest request)

public final LineageClient.BatchSearchLinkProcessesPagedResponse batchSearchLinkProcesses(BatchSearchLinkProcessesRequest request)

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 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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   BatchSearchLinkProcessesRequest request =
       BatchSearchLinkProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .addAllLinks(new ArrayList<String>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (ProcessLinks element : lineageClient.batchSearchLinkProcesses(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestBatchSearchLinkProcessesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageClient.BatchSearchLinkProcessesPagedResponse

batchSearchLinkProcessesCallable()

public final UnaryCallable<BatchSearchLinkProcessesRequest,BatchSearchLinkProcessesResponse> batchSearchLinkProcessesCallable()

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 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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   BatchSearchLinkProcessesRequest request =
       BatchSearchLinkProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .addAllLinks(new ArrayList<String>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     BatchSearchLinkProcessesResponse response =
         lineageClient.batchSearchLinkProcessesCallable().call(request);
     for (ProcessLinks element : response.getProcessLinksList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<BatchSearchLinkProcessesRequest,BatchSearchLinkProcessesResponse>

batchSearchLinkProcessesPagedCallable()

public final UnaryCallable<BatchSearchLinkProcessesRequest,LineageClient.BatchSearchLinkProcessesPagedResponse> batchSearchLinkProcessesPagedCallable()

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 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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   BatchSearchLinkProcessesRequest request =
       BatchSearchLinkProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .addAllLinks(new ArrayList<String>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<ProcessLinks> future =
       lineageClient.batchSearchLinkProcessesPagedCallable().futureCall(request);
   // Do something.
   for (ProcessLinks element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<BatchSearchLinkProcessesRequest,BatchSearchLinkProcessesPagedResponse>

close()

public final void close()

createLineageEvent(CreateLineageEventRequest request)

public final LineageEvent createLineageEvent(CreateLineageEventRequest request)

Creates a new lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateLineageEventRequest request =
       CreateLineageEventRequest.newBuilder()
           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setLineageEvent(LineageEvent.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   LineageEvent response = lineageClient.createLineageEvent(request);
 }
 
Parameter
NameDescription
requestCreateLineageEventRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageEvent

createLineageEvent(RunName parent, LineageEvent lineageEvent)

public final LineageEvent createLineageEvent(RunName parent, LineageEvent lineageEvent)

Creates a new lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
   LineageEvent lineageEvent = LineageEvent.newBuilder().build();
   LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
 }
 
Parameters
NameDescription
parentRunName

Required. The name of the run that should own the lineage event.

lineageEventLineageEvent

Required. The lineage event to create.

Returns
TypeDescription
LineageEvent

createLineageEvent(String parent, LineageEvent lineageEvent)

public final LineageEvent createLineageEvent(String parent, LineageEvent lineageEvent)

Creates a new lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
   LineageEvent lineageEvent = LineageEvent.newBuilder().build();
   LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
 }
 
Parameters
NameDescription
parentString

Required. The name of the run that should own the lineage event.

lineageEventLineageEvent

Required. The lineage event to create.

Returns
TypeDescription
LineageEvent

createLineageEventCallable()

public final UnaryCallable<CreateLineageEventRequest,LineageEvent> createLineageEventCallable()

Creates a new lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateLineageEventRequest request =
       CreateLineageEventRequest.newBuilder()
           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setLineageEvent(LineageEvent.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<LineageEvent> future =
       lineageClient.createLineageEventCallable().futureCall(request);
   // Do something.
   LineageEvent response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateLineageEventRequest,LineageEvent>

createProcess(CreateProcessRequest request)

public final Process createProcess(CreateProcessRequest request)

Creates a new process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateProcessRequest request =
       CreateProcessRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setProcess(Process.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Process response = lineageClient.createProcess(request);
 }
 
Parameter
NameDescription
requestCreateProcessRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Process

createProcess(LocationName parent, Process process)

public final Process createProcess(LocationName parent, Process process)

Creates a new process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Process process = Process.newBuilder().build();
   Process response = lineageClient.createProcess(parent, process);
 }
 
Parameters
NameDescription
parentLocationName

Required. The name of the project and its location that should own the process.

processProcess

Required. The process to create.

Returns
TypeDescription
Process

createProcess(String parent, Process process)

public final Process createProcess(String parent, Process process)

Creates a new process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Process process = Process.newBuilder().build();
   Process response = lineageClient.createProcess(parent, process);
 }
 
Parameters
NameDescription
parentString

Required. The name of the project and its location that should own the process.

processProcess

Required. The process to create.

Returns
TypeDescription
Process

createProcessCallable()

public final UnaryCallable<CreateProcessRequest,Process> createProcessCallable()

Creates a new process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateProcessRequest request =
       CreateProcessRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setProcess(Process.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Process> future = lineageClient.createProcessCallable().futureCall(request);
   // Do something.
   Process response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateProcessRequest,Process>

createRun(CreateRunRequest request)

public final Run createRun(CreateRunRequest request)

Creates a new run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateRunRequest request =
       CreateRunRequest.newBuilder()
           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setRun(Run.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Run response = lineageClient.createRun(request);
 }
 
Parameter
NameDescription
requestCreateRunRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Run

createRun(ProcessName parent, Run run)

public final Run createRun(ProcessName parent, Run run)

Creates a new run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
   Run run = Run.newBuilder().build();
   Run response = lineageClient.createRun(parent, run);
 }
 
Parameters
NameDescription
parentProcessName

Required. The name of the process that should own the run.

runRun

Required. The run to create.

Returns
TypeDescription
Run

createRun(String parent, Run run)

public final Run createRun(String parent, Run run)

Creates a new run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
   Run run = Run.newBuilder().build();
   Run response = lineageClient.createRun(parent, run);
 }
 
Parameters
NameDescription
parentString

Required. The name of the process that should own the run.

runRun

Required. The run to create.

Returns
TypeDescription
Run

createRunCallable()

public final UnaryCallable<CreateRunRequest,Run> createRunCallable()

Creates a new run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   CreateRunRequest request =
       CreateRunRequest.newBuilder()
           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setRun(Run.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Run> future = lineageClient.createRunCallable().futureCall(request);
   // Do something.
   Run response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateRunRequest,Run>

deleteLineageEvent(DeleteLineageEventRequest request)

public final void deleteLineageEvent(DeleteLineageEventRequest request)

Deletes the lineage event with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteLineageEventRequest request =
       DeleteLineageEventRequest.newBuilder()
           .setName(
               LineageEventName.of(
                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString())
           .setAllowMissing(true)
           .build();
   lineageClient.deleteLineageEvent(request);
 }
 
Parameter
NameDescription
requestDeleteLineageEventRequest

The request object containing all of the parameters for the API call.

deleteLineageEvent(LineageEventName name)

public final void deleteLineageEvent(LineageEventName name)

Deletes the lineage event with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   LineageEventName name =
       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
   lineageClient.deleteLineageEvent(name);
 }
 
Parameter
NameDescription
nameLineageEventName

Required. The name of the lineage event to delete.

deleteLineageEvent(String name)

public final void deleteLineageEvent(String name)

Deletes the lineage event with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name =
       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
           .toString();
   lineageClient.deleteLineageEvent(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the lineage event to delete.

deleteLineageEventCallable()

public final UnaryCallable<DeleteLineageEventRequest,Empty> deleteLineageEventCallable()

Deletes the lineage event with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteLineageEventRequest request =
       DeleteLineageEventRequest.newBuilder()
           .setName(
               LineageEventName.of(
                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString())
           .setAllowMissing(true)
           .build();
   ApiFuture<Empty> future = lineageClient.deleteLineageEventCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteLineageEventRequest,Empty>

deleteProcessAsync(DeleteProcessRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteProcessAsync(DeleteProcessRequest request)

Deletes the process with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteProcessRequest request =
       DeleteProcessRequest.newBuilder()
           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setAllowMissing(true)
           .build();
   lineageClient.deleteProcessAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteProcessRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteProcessAsync(ProcessName name)

public final OperationFuture<Empty,OperationMetadata> deleteProcessAsync(ProcessName name)

Deletes the process with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
   lineageClient.deleteProcessAsync(name).get();
 }
 
Parameter
NameDescription
nameProcessName

Required. The name of the process to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteProcessAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteProcessAsync(String name)

Deletes the process with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
   lineageClient.deleteProcessAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the process to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteProcessCallable()

public final UnaryCallable<DeleteProcessRequest,Operation> deleteProcessCallable()

Deletes the process with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteProcessRequest request =
       DeleteProcessRequest.newBuilder()
           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setAllowMissing(true)
           .build();
   ApiFuture<Operation> future = lineageClient.deleteProcessCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteProcessRequest,Operation>

deleteProcessOperationCallable()

public final OperationCallable<DeleteProcessRequest,Empty,OperationMetadata> deleteProcessOperationCallable()

Deletes the process with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteProcessRequest request =
       DeleteProcessRequest.newBuilder()
           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setAllowMissing(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       lineageClient.deleteProcessOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteProcessRequest,Empty,OperationMetadata>

deleteRunAsync(DeleteRunRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteRunAsync(DeleteRunRequest request)

Deletes the run with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteRunRequest request =
       DeleteRunRequest.newBuilder()
           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setAllowMissing(true)
           .build();
   lineageClient.deleteRunAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteRunRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRunAsync(RunName name)

public final OperationFuture<Empty,OperationMetadata> deleteRunAsync(RunName name)

Deletes the run with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
   lineageClient.deleteRunAsync(name).get();
 }
 
Parameter
NameDescription
nameRunName

Required. The name of the run to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRunAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteRunAsync(String name)

Deletes the run with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
   lineageClient.deleteRunAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the run to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRunCallable()

public final UnaryCallable<DeleteRunRequest,Operation> deleteRunCallable()

Deletes the run with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteRunRequest request =
       DeleteRunRequest.newBuilder()
           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setAllowMissing(true)
           .build();
   ApiFuture<Operation> future = lineageClient.deleteRunCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteRunRequest,Operation>

deleteRunOperationCallable()

public final OperationCallable<DeleteRunRequest,Empty,OperationMetadata> deleteRunOperationCallable()

Deletes the run with the specified name.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   DeleteRunRequest request =
       DeleteRunRequest.newBuilder()
           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setAllowMissing(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       lineageClient.deleteRunOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteRunRequest,Empty,OperationMetadata>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getLineageEvent(GetLineageEventRequest request)

public final LineageEvent getLineageEvent(GetLineageEventRequest request)

Gets details of a specified lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetLineageEventRequest request =
       GetLineageEventRequest.newBuilder()
           .setName(
               LineageEventName.of(
                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString())
           .build();
   LineageEvent response = lineageClient.getLineageEvent(request);
 }
 
Parameter
NameDescription
requestGetLineageEventRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageEvent

getLineageEvent(LineageEventName name)

public final LineageEvent getLineageEvent(LineageEventName name)

Gets details of a specified lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   LineageEventName name =
       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
   LineageEvent response = lineageClient.getLineageEvent(name);
 }
 
Parameter
NameDescription
nameLineageEventName

Required. The name of the lineage event to get.

Returns
TypeDescription
LineageEvent

getLineageEvent(String name)

public final LineageEvent getLineageEvent(String name)

Gets details of a specified lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name =
       LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
           .toString();
   LineageEvent response = lineageClient.getLineageEvent(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the lineage event to get.

Returns
TypeDescription
LineageEvent

getLineageEventCallable()

public final UnaryCallable<GetLineageEventRequest,LineageEvent> getLineageEventCallable()

Gets details of a specified lineage event.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetLineageEventRequest request =
       GetLineageEventRequest.newBuilder()
           .setName(
               LineageEventName.of(
                       "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString())
           .build();
   ApiFuture<LineageEvent> future = lineageClient.getLineageEventCallable().futureCall(request);
   // Do something.
   LineageEvent response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetLineageEventRequest,LineageEvent>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getProcess(GetProcessRequest request)

public final Process getProcess(GetProcessRequest request)

Gets the details of the specified process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetProcessRequest request =
       GetProcessRequest.newBuilder()
           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .build();
   Process response = lineageClient.getProcess(request);
 }
 
Parameter
NameDescription
requestGetProcessRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Process

getProcess(ProcessName name)

public final Process getProcess(ProcessName name)

Gets the details of the specified process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
   Process response = lineageClient.getProcess(name);
 }
 
Parameter
NameDescription
nameProcessName

Required. The name of the process to get.

Returns
TypeDescription
Process

getProcess(String name)

public final Process getProcess(String name)

Gets the details of the specified process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
   Process response = lineageClient.getProcess(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the process to get.

Returns
TypeDescription
Process

getProcessCallable()

public final UnaryCallable<GetProcessRequest,Process> getProcessCallable()

Gets the details of the specified process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetProcessRequest request =
       GetProcessRequest.newBuilder()
           .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .build();
   ApiFuture<Process> future = lineageClient.getProcessCallable().futureCall(request);
   // Do something.
   Process response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetProcessRequest,Process>

getRun(GetRunRequest request)

public final Run getRun(GetRunRequest request)

Gets the details of the specified run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetRunRequest request =
       GetRunRequest.newBuilder()
           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .build();
   Run response = lineageClient.getRun(request);
 }
 
Parameter
NameDescription
requestGetRunRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Run

getRun(RunName name)

public final Run getRun(RunName name)

Gets the details of the specified run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
   Run response = lineageClient.getRun(name);
 }
 
Parameter
NameDescription
nameRunName

Required. The name of the run to get.

Returns
TypeDescription
Run

getRun(String name)

public final Run getRun(String name)

Gets the details of the specified run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
   Run response = lineageClient.getRun(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the run to get.

Returns
TypeDescription
Run

getRunCallable()

public final UnaryCallable<GetRunRequest,Run> getRunCallable()

Gets the details of the specified run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   GetRunRequest request =
       GetRunRequest.newBuilder()
           .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .build();
   ApiFuture<Run> future = lineageClient.getRunCallable().futureCall(request);
   // Do something.
   Run response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetRunRequest,Run>

getSettings()

public final LineageSettings getSettings()
Returns
TypeDescription
LineageSettings

getStub()

public LineageStub getStub()
Returns
TypeDescription
LineageStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listLineageEvents(ListLineageEventsRequest request)

public final LineageClient.ListLineageEventsPagedResponse listLineageEvents(ListLineageEventsRequest request)

Lists lineage events in the given project and location. The list order is not defined.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListLineageEventsRequest request =
       ListLineageEventsRequest.newBuilder()
           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (LineageEvent element : lineageClient.listLineageEvents(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListLineageEventsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageClient.ListLineageEventsPagedResponse

listLineageEvents(RunName parent)

public final LineageClient.ListLineageEventsPagedResponse listLineageEvents(RunName parent)

Lists lineage events in the given project and location. The list order is not defined.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
   for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentRunName

Required. The name of the run that owns the collection of lineage events to get.

Returns
TypeDescription
LineageClient.ListLineageEventsPagedResponse

listLineageEvents(String parent)

public final LineageClient.ListLineageEventsPagedResponse listLineageEvents(String parent)

Lists lineage events in the given project and location. The list order is not defined.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
   for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The name of the run that owns the collection of lineage events to get.

Returns
TypeDescription
LineageClient.ListLineageEventsPagedResponse

listLineageEventsCallable()

public final UnaryCallable<ListLineageEventsRequest,ListLineageEventsResponse> listLineageEventsCallable()

Lists lineage events in the given project and location. The list order is not defined.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListLineageEventsRequest request =
       ListLineageEventsRequest.newBuilder()
           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLineageEventsResponse response =
         lineageClient.listLineageEventsCallable().call(request);
     for (LineageEvent element : response.getLineageEventsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListLineageEventsRequest,ListLineageEventsResponse>

listLineageEventsPagedCallable()

public final UnaryCallable<ListLineageEventsRequest,LineageClient.ListLineageEventsPagedResponse> listLineageEventsPagedCallable()

Lists lineage events in the given project and location. The list order is not defined.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListLineageEventsRequest request =
       ListLineageEventsRequest.newBuilder()
           .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<LineageEvent> future =
       lineageClient.listLineageEventsPagedCallable().futureCall(request);
   // Do something.
   for (LineageEvent element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListLineageEventsRequest,ListLineageEventsPagedResponse>

listProcesses(ListProcessesRequest request)

public final LineageClient.ListProcessesPagedResponse listProcesses(ListProcessesRequest request)

List processes in the given project and location. List order is descending by insertion time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListProcessesRequest request =
       ListProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Process element : lineageClient.listProcesses(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListProcessesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageClient.ListProcessesPagedResponse

listProcesses(LocationName parent)

public final LineageClient.ListProcessesPagedResponse listProcesses(LocationName parent)

List processes in the given project and location. List order is descending by insertion time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The name of the project and its location that owns this collection of processes.

Returns
TypeDescription
LineageClient.ListProcessesPagedResponse

listProcesses(String parent)

public final LineageClient.ListProcessesPagedResponse listProcesses(String parent)

List processes in the given project and location. List order is descending by insertion time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The name of the project and its location that owns this collection of processes.

Returns
TypeDescription
LineageClient.ListProcessesPagedResponse

listProcessesCallable()

public final UnaryCallable<ListProcessesRequest,ListProcessesResponse> listProcessesCallable()

List processes in the given project and location. List order is descending by insertion time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListProcessesRequest request =
       ListProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListProcessesResponse response = lineageClient.listProcessesCallable().call(request);
     for (Process element : response.getProcessesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListProcessesRequest,ListProcessesResponse>

listProcessesPagedCallable()

public final UnaryCallable<ListProcessesRequest,LineageClient.ListProcessesPagedResponse> listProcessesPagedCallable()

List processes in the given project and location. List order is descending by insertion time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListProcessesRequest request =
       ListProcessesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Process> future = lineageClient.listProcessesPagedCallable().futureCall(request);
   // Do something.
   for (Process element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListProcessesRequest,ListProcessesPagedResponse>

listRuns(ListRunsRequest request)

public final LineageClient.ListRunsPagedResponse listRuns(ListRunsRequest request)

Lists runs in the given project and location. List order is descending by start_time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListRunsRequest request =
       ListRunsRequest.newBuilder()
           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Run element : lineageClient.listRuns(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListRunsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageClient.ListRunsPagedResponse

listRuns(ProcessName parent)

public final LineageClient.ListRunsPagedResponse listRuns(ProcessName parent)

Lists runs in the given project and location. List order is descending by start_time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
   for (Run element : lineageClient.listRuns(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProcessName

Required. The name of process that owns this collection of runs.

Returns
TypeDescription
LineageClient.ListRunsPagedResponse

listRuns(String parent)

public final LineageClient.ListRunsPagedResponse listRuns(String parent)

Lists runs in the given project and location. List order is descending by start_time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
   for (Run element : lineageClient.listRuns(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The name of process that owns this collection of runs.

Returns
TypeDescription
LineageClient.ListRunsPagedResponse

listRunsCallable()

public final UnaryCallable<ListRunsRequest,ListRunsResponse> listRunsCallable()

Lists runs in the given project and location. List order is descending by start_time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListRunsRequest request =
       ListRunsRequest.newBuilder()
           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListRunsResponse response = lineageClient.listRunsCallable().call(request);
     for (Run element : response.getRunsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRunsRequest,ListRunsResponse>

listRunsPagedCallable()

public final UnaryCallable<ListRunsRequest,LineageClient.ListRunsPagedResponse> listRunsPagedCallable()

Lists runs in the given project and location. List order is descending by start_time.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ListRunsRequest request =
       ListRunsRequest.newBuilder()
           .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Run> future = lineageClient.listRunsPagedCallable().futureCall(request);
   // Do something.
   for (Run element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRunsRequest,ListRunsPagedResponse>

processOpenLineageRunEvent(ProcessOpenLineageRunEventRequest request)

public final ProcessOpenLineageRunEventResponse processOpenLineageRunEvent(ProcessOpenLineageRunEventRequest request)

Creates new lineage events together with their parents: process and run. Updates the process and run if they already exist. Mapped from Open Lineage specification: https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessOpenLineageRunEventRequest request =
       ProcessOpenLineageRunEventRequest.newBuilder()
           .setParent("parent-995424086")
           .setOpenLineage(Struct.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ProcessOpenLineageRunEventResponse response =
       lineageClient.processOpenLineageRunEvent(request);
 }
 
Parameter
NameDescription
requestProcessOpenLineageRunEventRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ProcessOpenLineageRunEventResponse

processOpenLineageRunEvent(String parent, Struct openLineage)

public final ProcessOpenLineageRunEventResponse processOpenLineageRunEvent(String parent, Struct openLineage)

Creates new lineage events together with their parents: process and run. Updates the process and run if they already exist. Mapped from Open Lineage specification: https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   String parent = "parent-995424086";
   Struct openLineage = Struct.newBuilder().build();
   ProcessOpenLineageRunEventResponse response =
       lineageClient.processOpenLineageRunEvent(parent, openLineage);
 }
 
Parameters
NameDescription
parentString

Required. The name of the project and its location that should own the process, run, and lineage event.

openLineageStruct

Required. OpenLineage message following OpenLineage format: https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json

Returns
TypeDescription
ProcessOpenLineageRunEventResponse

processOpenLineageRunEventCallable()

public final UnaryCallable<ProcessOpenLineageRunEventRequest,ProcessOpenLineageRunEventResponse> processOpenLineageRunEventCallable()

Creates new lineage events together with their parents: process and run. Updates the process and run if they already exist. Mapped from Open Lineage specification: https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   ProcessOpenLineageRunEventRequest request =
       ProcessOpenLineageRunEventRequest.newBuilder()
           .setParent("parent-995424086")
           .setOpenLineage(Struct.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<ProcessOpenLineageRunEventResponse> future =
       lineageClient.processOpenLineageRunEventCallable().futureCall(request);
   // Do something.
   ProcessOpenLineageRunEventResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ProcessOpenLineageRunEventRequest,ProcessOpenLineageRunEventResponse>
public final LineageClient.SearchLinksPagedResponse searchLinks(SearchLinksRequest request)

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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   SearchLinksRequest request =
       SearchLinksRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Link element : lineageClient.searchLinks(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestSearchLinksRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
LineageClient.SearchLinksPagedResponse

searchLinksCallable()

public final UnaryCallable<SearchLinksRequest,SearchLinksResponse> searchLinksCallable()

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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   SearchLinksRequest request =
       SearchLinksRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     SearchLinksResponse response = lineageClient.searchLinksCallable().call(request);
     for (Link element : response.getLinksList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<SearchLinksRequest,SearchLinksResponse>

searchLinksPagedCallable()

public final UnaryCallable<SearchLinksRequest,LineageClient.SearchLinksPagedResponse> searchLinksPagedCallable()

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.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   SearchLinksRequest request =
       SearchLinksRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Link> future = lineageClient.searchLinksPagedCallable().futureCall(request);
   // Do something.
   for (Link element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<SearchLinksRequest,SearchLinksPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateProcess(Process process, FieldMask updateMask)

public final Process updateProcess(Process process, FieldMask updateMask)

Updates a process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   Process process = Process.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Process response = lineageClient.updateProcess(process, updateMask);
 }
 
Parameters
NameDescription
processProcess

Required. The lineage process to update.

The process's name field is used to identify the process to update.

updateMaskFieldMask

The list of fields to update. Currently not used. The whole message is updated.

Returns
TypeDescription
Process

updateProcess(UpdateProcessRequest request)

public final Process updateProcess(UpdateProcessRequest request)

Updates a process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   UpdateProcessRequest request =
       UpdateProcessRequest.newBuilder()
           .setProcess(Process.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setAllowMissing(true)
           .build();
   Process response = lineageClient.updateProcess(request);
 }
 
Parameter
NameDescription
requestUpdateProcessRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Process

updateProcessCallable()

public final UnaryCallable<UpdateProcessRequest,Process> updateProcessCallable()

Updates a process.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   UpdateProcessRequest request =
       UpdateProcessRequest.newBuilder()
           .setProcess(Process.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setAllowMissing(true)
           .build();
   ApiFuture<Process> future = lineageClient.updateProcessCallable().futureCall(request);
   // Do something.
   Process response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateProcessRequest,Process>

updateRun(Run run, FieldMask updateMask)

public final Run updateRun(Run run, FieldMask updateMask)

Updates a run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   Run run = Run.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Run response = lineageClient.updateRun(run, updateMask);
 }
 
Parameters
NameDescription
runRun

Required. The lineage run to update.

The run's name field is used to identify the run to update.

Format: projects/{project}/locations/{location}/processes/{process}/runs/{run}.

updateMaskFieldMask

The list of fields to update. Currently not used. The whole message is updated.

Returns
TypeDescription
Run

updateRun(UpdateRunRequest request)

public final Run updateRun(UpdateRunRequest request)

Updates a run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   UpdateRunRequest request =
       UpdateRunRequest.newBuilder()
           .setRun(Run.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setAllowMissing(true)
           .build();
   Run response = lineageClient.updateRun(request);
 }
 
Parameter
NameDescription
requestUpdateRunRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Run

updateRunCallable()

public final UnaryCallable<UpdateRunRequest,Run> updateRunCallable()

Updates a run.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LineageClient lineageClient = LineageClient.create()) {
   UpdateRunRequest request =
       UpdateRunRequest.newBuilder()
           .setRun(Run.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setAllowMissing(true)
           .build();
   ApiFuture<Run> future = lineageClient.updateRunCallable().futureCall(request);
   // Do something.
   Run response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateRunRequest,Run>