Class TabularDataSetProvisioningLineage

java.lang.Object
org.odpi.openmetadata.adapters.connectors.governanceactions.provisioning.TabularDataSetProvisioningLineage

public class TabularDataSetProvisioningLineage extends Object
TabularDataSetProvisioningLineage records the lineage of a copy made by a tabular data set provisioning service: the data flows from the source data set, through the process that did the copying, into the destination data set, and - where both data sets have their columns catalogued - the data mappings from each source column to the destination column it was copied into.

The process that the lineage passes through is chosen as follows:
  • If the caller named a top-level process, it is used - and created if it does not exist, optionally from a template. Unless lineage is restricted to the top-level process, each run adds a child process beneath it, and the lineage passes through the child.
  • Otherwise, if the engine action running the service was started by a governance action process - which is the case for the provisioning pipeline a digital subscription sets up - the lineage passes through the process instance that Egeria created for this run of it. The instance is a transient embedded process governed by the governance action process, so it plays the part of the child process and no other is created. If lineage is restricted to the top-level process, it passes through the governance action process itself.
  • Otherwise the default top-level process for the service is used, as in the first case.
Deliveries are repeated - a subscription refreshes its destination whenever the product's data changes - so a relationship that is already in place is not created again.
  • Constructor Details

    • TabularDataSetProvisioningLineage

      public TabularDataSetProvisioningLineage(GovernanceActionContext governanceContext, String defaultTopLevelProcessName)
      Constructor.
      Parameters:
      governanceContext - context of the calling governance action service
      defaultTopLevelProcessName - qualified name of the top-level process to use when neither the caller nor the engine action supply one
  • Method Details

    • setTopLevelProcessName

      public void setTopLevelProcessName(String topLevelProcessName)
      Set the qualified name of the top-level process that the caller asked for.
      Parameters:
      topLevelProcessName - qualified name
    • setTopLevelProcessTemplateQualifiedName

      public void setTopLevelProcessTemplateQualifiedName(String topLevelProcessTemplateQualifiedName)
      Set the qualified name of the template to create the top-level process from, if it does not exist.
      Parameters:
      topLevelProcessTemplateQualifiedName - qualified name of a process template
    • setInformationSupplyChainQualifiedName

      public void setInformationSupplyChainQualifiedName(String informationSupplyChainQualifiedName)
      Set the qualified name of the information supply chain that the lineage belongs to. If none is set, the one recorded on the engine action is used.
      Parameters:
      informationSupplyChainQualifiedName - qualified name
    • setChildProcessLineage

      public void setChildProcessLineage(boolean childProcessLineage)
      Set whether each run adds a child process beneath the top-level process.
      Parameters:
      childProcessLineage - flag
    • setColumnLevelLineage

      public void setColumnLevelLineage(boolean columnLevelLineage)
      Set whether the columns of the source and destination are mapped to one another.
      Parameters:
      columnLevelLineage - flag
    • createLineage

      public TabularDataSetProvisioningLineage.LineageSummary createLineage(String sourceAssetGUID, String destinationAssetGUID, String runIdentifier, Map<String,String> deliveredTables) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Record the lineage for a delivery from the source data set to the destination data set.
      Parameters:
      sourceAssetGUID - unique identifier of the source data set
      destinationAssetGUID - unique identifier of the destination data set
      runIdentifier - identifier of this run, used to name its child process
      deliveredTables - the tables delivered, in canonical form: source table name mapped to the name of the destination table it was copied into
      Returns:
      summary of the lineage recorded
      Throws:
      InvalidParameterException - one of the parameters passed to open metadata is invalid
      UserNotAuthorizedException - the service is not authorized to create lineage
      PropertyServerException - a problem with the metadata store