You are on page 1of 3

Name of Solution:

Mapping: Incremental Extraction of Source

Business Requirement:
Informatica PowerCenter mapping to automate the incremental extraction of source rows
using Mapping Variable functionality.

Solution URL:
https://community.informatica.com/solutions/1635

Supported Version:
PowerCenter 9.1 and 9.5

Description:
When data in a source table is frequently updated, it is necessary to capture the updated
information in the data warehouse. However, due to data volumes and load window
considerations, it is desirable to process only those records that have been updated, rather
than re-reading the entire source into a mapping.
Usually there is an update timestamp column in the source table. This column can be used
to filter the source records for reading the updated rows. This filter condition has to change
every time the mapping is run to extract only the records that were updated since the last
run. This mapping template illustrates a method of using the mapping parameter
functionality to dynamically build the filter every time the mapping run.
The mapping in this template uses a mapping parameter file, which stores the parameter
value to track and store the maximum value of update timestamp every time the session
runs. For the first run a mapping parameter file is, it can be called by mapping logic at
runtime from the second run.
When a session begins, it takes the default value of the mapping parameter for the first run
and from the second run value is taken from parameter file. When the session ends, it saves
the new value of the mapping parameter back to the parameter file, to be used the next
time the session is run.

Download file contents:


1. Workflow
2. Scripts

Please rate this solution and share your feedback on Marketplace Website.

Pre-Requisites / System Requirement:


1. Scripts for table structure and data are provided with bundle. Scripts can be found in
Scripts folder after extract.
2. UpdateData script needs to be implemented for second execution.
3. Observe the mapping objects and check for initial value of mapping parameter.

Steps to implement the solution:


1. Execute the Scripts\LoadData.Sql the database. This should create source and
target table with data. Observe the data of source and target as per following
screenshots respectively.

2. Import wf_m_Extract_Incremental_Changes.xml using Repository Manager.


Note: The

core functionality of this solution is

present

as a

mapplet in

wf_m_Extract_Incremental_Changes_With_Mapplet.XML. If you want to use this


solution as a mapplet in any of your mappings, just copy the mapplet after importing
the contents export file.
3. Select the appropriate folder from repository and resolve the conflicts by choosing
suitable option.
4. Open the workflow wf_m_Extract_Incremental_Changes.xml in Workflow Manager.
5. Assign the integration service in Workflow -> Edit -> Integration Service.
6. Edit session and assign valid connection object for the source and target.
7. For more details for importing object please visit our YouTube link.

Please rate this solution and share your feedback on Marketplace Website.

8. Run the workflow and observe the result Workflow Monitor. Only four rows are
considered for update since only those satisfy the condition. Observe the data in
database.
9. Execute Scripts\UpdateData.Sql in the database. Observe that first three rows are
updated. Have a look at time stamp column.

10. For the second run, edit workflow and paste the parameter file path as shown below.

11. Execute the workflow and observe the result in Workflow Monitor. Observe that only
two rows are getting updated.

YouTube Video on Importing and Configuring Workflows:


http://www.youtube.com/playlist?list=PLLRreK2jjjgWBQ4NPfp0QWTxYDvlnEqSJ

Other Useful links:


Mapping Bundles
Workflow Bundles
Informatica Tools Bundles
Informatica for Social Media Bundles
Debugging Tools Bundles
Visio Templates Bundles
B2B Templates and Projects Bundles
Data Quality Packs and Plans Bundles
Script Bundles

Please rate this solution and share your feedback on Marketplace Website.

You might also like