0% found this document useful (0 votes)
28 views

Mapping Variable Is Used in CDC Logic

This document discusses using mapping variables in Change Data Capture (CDC) implementations in Informatica. It describes setting a mapping variable to track the last updated timestamp and using it in the source query filter. The mapping variable value is stored in the repository after successful runs and can be overridden using a parameter file for testing purposes. Recovery tables are also created to track workflow runs and enable recovery from failures.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Mapping Variable Is Used in CDC Logic

This document discusses using mapping variables in Change Data Capture (CDC) implementations in Informatica. It describes setting a mapping variable to track the last updated timestamp and using it in the source query filter. The mapping variable value is stored in the repository after successful runs and can be overridden using a parameter file for testing purposes. Recovery tables are also created to track workflow runs and enable recovery from failures.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

CDC implementation using mapping variable: Scnerio :- Say we need to implement Change Data Capture for CUSTOMER data

load. We need to load any new customer or changed customers data to a flat file We have Update_TS as a column that changes for every new or updated customer Create a mapping variable as shown in below image. $$M_DATA_END_TIME as Date/Time

Step 2) In source qualifier override give below filter condition

3) in expression t/f SETMAXVARIABLE($M_DATA_END_TIME,UPDATE_TS)

This expression will make sure that, latest value from the the column UPDATE_TS is stored into the repository after the successful completion of the session run. Map remining columns to target and mapping is complete Once you look into the session log file you can see the mapping variable value is retrieved from the repository and used in the source SQL, just like shown in the image below.

Mapping variable is used in CDC logic New Value of the mapping variable is stored in repository ,only after successful run of the session Since the last success point - variable value, is stored in repository, we cannot go back and reprocess an already processed data set Mapping variable takes the starting value from either a) Parameter file b) pre session variable assignment c) value in repository d) Initial value e)default value We can override Mapping varible using parameter file parameter file is defined at workflw or session level as below

The parameter file will have the name of the mapping variable and the overriding value for variable eg [s_Load_CUST_DIM] $$M_LST_RUN_TS=01-01-2013 00:00:00 Note : Remove mapping variable value from the parameter file to use the value saved in the repository. The parameter file will look like [s_Load_CUST_DIM] $$M_LST_RUN_TS= Advantages :env when there is a need to override the repository persisted mapping variable value. ses Another way is

Step 2:-

Enable Test Load:If you need to test if your mapping is running successfully, instead of using dummy data , use the Test load option in session properites With the test load , IS performs all the t/f ,creates session files, runs the mapping but without loading data in target table

RECOVERY MECHINISM

The informatica recovery option create 3 recovery tables in the target database ($PMRootDir/storage) and save the workflow run stats during the process and these tables are used to recover data..so the last checkpoint is where the last row failed to be loaded to target table

You might also like