11 Ways to Make Informatica PowerCenter Code Reusable
Reusability is a great feature in Informatica PowerCenter which can be used by developers. Its general purpose is to reduce unnecessary coding which ultimately reduces development time and increases supportability. In this article lets see different options available in Informatica PowerCenter to make your code reusable.
- Mapplet
- Reusable Transformation
- Shared Folder
- Global Repository
- Worklet
- Reusable Session
- Reusable Tasks
- Mapping Parameter
- Mapping Variable
- WorkFlow Variable
- Worklet Variable
1. Mapplet
Mapplet is a reusable object that you create in the Mapplet Designer. It contains a set of transformations and lets you reuse the transformation logic in multiple mappings. When you use a mapplet in a mapping, you use an instance of the mapplet. Any change made to the mapplet is inherited by all instances of the mapplet.
If you have several fact tables that require a series of dimension keys, you can create a mapplet containing a series of Lookup transformations to find each dimension key. You can then use the mapplet in each fact table mapping.
Learn more about Mapplets from the Demo Video
Learn more about Mapplets from the Demo Video
2. Reusable Transformation
Reusable Transformations can be created in Transformation Developer and can be reused in multiple mappings. When you use a reusable transformation in a mapping, you use an instance of the transformation. Any change made to the transformation is inherited by all its instances.
If you have a business rule to trim spaces from customer name and customer address columns, then you can create a reusable expression transformation to trim spaces from the column, which can be reused in multiple mappings.
Learn more about Reusable Transformations from the Demo Video
Learn more about Reusable Transformations from the Demo Video
3. Shared Folder
A Shared folder can be created in a Repository from the repository manager. The objects from the shared folder can be accessed using shortcuts from different folders in the same Repository.
You can create all the reusable framework objects (CDC Framework, Error Handling Framework etc...) in the Shared Folder and can be accessed using shortcuts from different folders in the same repository.
4. Global Repository
A Global Repository can be created in a Repository Domain which is linked to multiple Local Repositories. An object created in the Global Repository is accessible from the Local Repositories using the shortcuts created to the global objects. Any change in the Global Repository Object will be inherited to all the shortcut objects.
You can create all the reusable framework objects (CDC Framework, Error Handling Framework etc...) in the Global Repository and can be accessed using shortcuts from different local repositories.
5. Worklet
A worklet is an object created by combining set of tasks to build a workflow logic. Worklet can be reused in multiple workflows, which can be configured to run concurrently. You can create a worklet in the Worklet Designer.
Reusable worklet implemented in the Change Data Capture Framework, which is discussed in one of our prior article is a practical application of worklet.
6. Reusable Session
A session is a set of instructions that tells the Integration Service how and when to move data from sources to targets. You can create a reusable Session task in the Task Developer. A reusable session can be used multiple workflows and even in a worklet.
Reusable session used in the Operational Metadata Logging Framework, which is discussed in one of our prior article is a practical implementation of reusable session.
7. Reusable Tasks
Apart from the reusable session task, we can create reusable email task and reusable command task in the Task Developer. We can reuse these reusable tasks in multiple workflows and worklets.
A reusable email task can be used to create a standard session failure email notification, which can be reused in different session tasks.
8. Mapping Parameter
Define values that remain constant throughout a session, such as state sales tax rates. When declared in a mapping or mapplet, $$ParameterName is a user-defined mapping parameter.
9. Mapping Variable
Define values that can change during a session. The Integration Service saves the value of a mapping variable to the repository at the end of each successful session run and uses that value the next time you run the session. When declared in a mapping or mapplet, $$VariableName is a mapping variable. Read more about mapping variables implementation from the article Change Data Capture (CDC) Made Easy Using Mapping Variables
10. WorkFlow Variable
You can create user defined workflow variables to pass variable values between mapping, sessions within a workflow. Even if the workflow variables alone do not give code reusability, it works with other components to provide reusability. Read more on workflow variable from the article An ETL Framework for Change Data Capture.
11. Worklet Variable
User defined worklet variables can be create in worklets to pass values between mapping, sessions, worklets within a workflow. Worklet variables by itself do not give code reusability, but it works with other components to facilitate code reusability. Learn more on worklet variable from the article An ETL Framework for Change Data Capture.
In addition to the parameters and variables mentioned above, Informatica PowerCenter provides much more type of Variables and Parameters, which provide more flexibility to build reusable code, such as
- Service variables.
- Service process variables.
- Session parameters.
- $Source. $Target connection variables.
- Email variables.
- Local variables.
- Built-in variables.