java.lang.Object
org.odpi.openmetadata.openconnectors.governancedaemonconnectors.lineagewarehouseconnectors.janusconnector.graph.LineageGraphQueryService
All Implemented Interfaces:
LineageWarehouseQueryService

public class LineageGraphQueryService extends Object implements LineageWarehouseQueryService
  • Constructor Details

    • LineageGraphQueryService

      public LineageGraphQueryService(GraphHelper graphHelper, AuditLog auditLog)
  • Method Details

    • lineage

      public LineageResponse lineage(Scope scope, String guid, boolean includeProcesses)
      Retrieve lineage starting from the entity identified by the guid
      Specified by:
      lineage in interface LineageWarehouseQueryService
      Parameters:
      scope - the type of lineage to retrieve
      guid - the guid of the entity from which to start
      Returns:
      the lineage vertices and edges that compose the graph
    • endToEnd

      public Optional<LineageVerticesAndEdges> endToEnd(String guid, boolean includeProcesses)
      Returns the end to end graph of queried entity, which can be a column or a table. In case of tables, relationships of type DataFlow will be traversed backwards and forwards, all the way to the source and the destination, respectively. If no vertices are found, then DataFlow relationships are used for traversal. In case of columns, DataFlow relationships are directly used
      Parameters:
      guid - queried entity
      includeProcesses - include processes
      Returns:
      graph in an Open Lineage specific format
    • ultimateSource

      public Optional<LineageVerticesAndEdges> ultimateSource(String guid)
      Returns the ultimate source graph of queried entity, which can be a column or a table. In case of tables, relationships of type DataFlow will be traversed backwards, all the way to the source. If no vertices are found, then DataFlow relationships are used for traversal. In case of columns, DataFlow relationships are directly used
      Parameters:
      guid - queried entity
      Returns:
      graph in an Open Lineage specific format
    • ultimateDestination

      public Optional<LineageVerticesAndEdges> ultimateDestination(String guid)
      Returns the ultimate destination graph of queried entity, which can be a column or a table. In case of tables, relationships of type DataFlow will be traversed forwards, all the way to the destination. If no vertices are found, then DataFlow relationships are used for traversal. In case of columns, DataFlow relationships are directly used
      Parameters:
      guid - queried entity
      Returns:
      graph in an Open Lineage specific format
    • verticalLineage

      public Optional<LineageVerticesAndEdges> verticalLineage(String guid)
      Returns a subgraph navigating the edges of interest based on target node type. For more info, check glossaryTermVerticalLineage(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource, java.lang.String), tabularColumnVerticalLineage(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource, java.lang.String), relationalColumnVerticalLineage(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource, java.lang.String)
      Parameters:
      guid - guid to extract vertical lineage for
      Returns:
      a subgraph in an Open Lineage specific format
    • getEntityDetails

      public LineageVertexResponse getEntityDetails(String guid)
      Gets entity details.
      Specified by:
      getEntityDetails in interface LineageWarehouseQueryService
      Parameters:
      guid - the guid
      Returns:
      the entity details
    • getTypes

      public LineageTypesResponse getTypes()
      Gets available entities types from lineage repository.
      Specified by:
      getTypes in interface LineageWarehouseQueryService
      Returns:
      the available entities types
    • getNodes

      public LineageNodeNamesResponse getNodes(NodeNamesSearchCriteria searchCriteria)
      Gets nodes names of certain type with display name containing a certain value - case insensitive
      Specified by:
      getNodes in interface LineageWarehouseQueryService
      Parameters:
      searchCriteria - contains the type of the node names to search for, a search string being part of the display name of the nodes, the maximum number of node names to retrieve
      Returns:
      the node names that match criteria
    • getElementHierarchy

      public LineageResponse getElementHierarchy(ElementHierarchyRequest elementHierarchyRequest)
      Description copied from interface: LineageWarehouseQueryService
      Retrieve hierarchy starting from the entity identified by the guid
      Specified by:
      getElementHierarchy in interface LineageWarehouseQueryService
      Parameters:
      elementHierarchyRequest - contains the guid of the queried node and the hierarchyType of the display name of the nodes, the maximum number of node names to retrieve
      Returns:
      the lineage vertices and edges that compose the hierarchy
    • search

      public LineageSearchResponse search(LineageSearchRequest lineageSearchRequest)
      Search the database for entities matching the search request
      Specified by:
      search in interface LineageWarehouseQueryService
      Parameters:
      lineageSearchRequest - the criteria for the search
      Returns:
      all the entities in the graph that match the criteria