Catalog Administrator Guide > Custom Metadata Integration Overview > Context Lineage for Custom Resources
  

Context Lineage for Custom Resources

The lineage for an asset such as a mapping or stored procedure varies based on the execution instances. A context is an execution instance of an asset. Viewing the details of such instances in the catalog ensures accuracy of the lineage and impact analysis, and maintains the correct dependencies between various assets in the catalog.
For example, the following table shows multiple data sets consumed by the same stored procedure in different execution instances:
Data Sets
Mapping
Execution Instance
Context
Data set A
Stored Procedure 1
Execution Instance A
Context 1
Data set B
Stored Procedure 1
Execution Instance B
Context 2
The data set A is consumed by stored procedure 1 in execution instance A, and the data set B is consumed by stored procedure 1 in execution instance B. In the Lineage and Impact diagram, you can see all the contexts in which the stored procedure is executed. In this example, context 1 refers to execution instance A, and context 2 refers to the execution instance B. You can set the context for each execution instance so that the Lineage and Impact diagram lists the contexts for you to identify the instances.
You can use Enterprise Data Catalog to view the execution context of a process definition in the Lineage and Impact diagram using custom resources. The parameters that define the dataflow of multiple source and target assets is defined as a process definition. The process definition types include stored procedure or mapping definitions. The execution of a process definition is defined as a process instance.
The following image shows the links or associations that must be included in the custom model to view context metadata in the lineage:
Context Lineage workflow
You must use the Process Definition and Process Instance abstract classes to define the custom classes, and the Context class to define the execution contexts. For more information, see the Context Lineage Resource CSV File Structure topic.

Ingesting Context Metadata using Custom Resources

To ingest context metadata using custom resources in the Catalog Administrator, perform the following steps:
  1. 1. Derive an out-of-the-box custom model from the com.infa.ldm.processflow system model. Include the processDefinition and processInstance classes from the com.infa.ldm.processflow system model as parent or superclasses in the derived custom model.
  2. The custom model creation includes the following steps:
    For more information about custom models and creating custom models, see the Custom Metadata Integration Workflow and the Creating Custom Models sections.
  3. 2. Register the custom model with the Catalog Administrator. For more information about registering a custom model, see the Creating the Custom Model with Custom Icons topic.
  4. 3. Create a custom resource type. For more information, see the Creating Custom Resource Types topic.
  5. 4. Select the models that you want to assign to the custom metadata template.
  6. 5. Use the CSV files in the custom resource type template to fill metadata and association details of the data source. You can also fill the transformation mapping details if you plan to view the transformation details between multiple data sources in the lineage diagram.
  7. 6. Create a custom resource and upload a ZIP file that includes the CSV files with data when you configure the resource. For more information, see the Creating Custom Resources topic.
  8. 7. Run the resource.
  9. Note: To view the processInstance class within the processDefinition in the custom model, you must derive the processInstance from the core.DataSet.
    For more information about viewing context information in the lineage diagram, see the Informatica 10.4.1 Enterprise Data Catalog User Guide.

Context Lineage Resource CSV File Structure

You can configure a custom resource to view the context information associated with a process definition, or mapping definition.
The following table describes the elements that must be included in the objects.csv file to view context information in the lineage:
Element
Description
Classes
Include the following classes in the custom model:
  • - com.infa.ldm.processflow.ProcessDefinition. Links the source and target objects at the process flow level. You must define an instance or a subclass of this class in the custom model.
  • - com.infa.ldm.processflow.ProcessInstance. The execution of a process definition is called a process instance. The process flow links are established at the process instance level.
  • - com.infa.ldm.processflow.Context and com.infa.ldm.processflow.ExecutionContext. Contains all the execution context objects.
com.infa.ldm.processflow.contextId
Mandatory. Specify the context ID for all the context objects. The length of the context ID must be 32 characters, and unique. You can use the MD5 Hash algorithm to generate unique context IDs.
Note: The context information is not displayed in the detailed lineage if the context ID is not assigned to the context objects.
For more information about including the classes in the custom data source, see the Entering Class Details topic.
The following table describes the associations that must be included in the links.csv file to view context information in the lineage:
Association
Description
com.infa.ldm.processflow.ProcessDefinitionToInstance
Links the process definitions to the process instances.
com.infa.ldm.processflow.ProcessDefinitionToContext
Links the context objects to the process definitions.
For more information about including associations in the custom data source, see the Entering Association Details topic.
The following table describes the elements that must be included in the lineage.csv file to view context information in the lineage:
Element
Description
Association
Include the following dataflow associations:
  • - core.DataSetDataFlow. Optional. Links the source and target object at data set level.
  • - com.infa.ldm.etl.DetailedDataSetDataFlow. Links the data sets and the process flows, or transformation objects and creates lineage links between data sets and process flows.
  • - com.infa.ldm.etl.DetailedDataFlow. Links data element and process flows at the column level.
Include the following process flow associations:
  • - com.infa.ldm.processflow.DataSetContextAttributeProjection. Projects the data set attributes such as source resource name, and target resource name as context information in the lineage.
  • - com.infa.ldm.processflow.DataSetToContext. Links the source objects to the context objects.
  • - com.infa.ldm.processflow.ContextToDataSet. Links the context objects to the target objects.
core.targetAttribute
A source or a target data set creates two dataflow links to context.
For a source data set, the core.targetAttribute element must include com.infa.ldm.processflow.sourceName, and com.infa.ldm.processflow.sourceResourceName as the context dataflow links.
For a target data set, the core.targetAttribute element must include com.infa.ldm.processflow.targetName, and com.infa.ldm.processflow.targetResourceName as the context dataflow links.
Note: Specify the core.targetAttribute only for the com.infa.ldm.processflow.DataSetContextAttributeProjection association.
com.infa.ldm.processflow.contextId
Mandatory. Specify the context ID for all the dataflow links. The length of the context ID must be 32 characters, and unique. You can use the MD5 Hash algorithm to generate unique context IDs.
Note: The context information is not displayed in the detailed lineage if the context ID is not assigned to the dataflow links.
You must include the context ID for the following associations:
  • - com.infa.ldm.etl.DetailedDataFlow
  • - core.DataSetDataFlow
  • - core.DirectionalDataFlow
  • - com.infa.ldm.etl.DetailedDataElementDataSetDataFlow
  • - com.infa.ldm.etl.DetailedDataSetDataElementDataFlow
For more information about including the transformations in the custom data source, see the Entering Transformation Details for Custom ETL Resources topic.