Wednesday, February 15, 2017

INFORMATICA DEBUGGER

Introduction 

Informatica Debugger is inbuilt tool in informatica designer for testing and tracking errors in Informatica at run time, the data can be checked at each transformation level and can be modified for testing and analyzing. The informatica mapping should be in valid state for debugging the mapping. To debug a mapping, configure and run the Debugger from within the Mapping Designer. The Debugger uses a session to run the mapping on the Integration Service. When you run the Debugger, it pauses at breakpoints and you can view and edit transformation output data.

Debugger can be used in the following cases:
      Before a session run: Debugger can be used to test the mapping before the actual session run.
      After a session run: If a session fails or inserts unexpected results in the target, Debugger can be used to identify the cause.

Running Debugger

We can start Debugger from Informatica Designer, in toolbar click on mappings tab and go to Debugger and click on start Debugger or by pressing F9 Key.

                                         



                   The following window appears





Click next and select the integration service and type of session on which your mapping runs. Three types of sessions can be created
·         Use an existing session
·         Use an existing reusable session
·         Create a debug session instance
If reusable session or non-reusable session is already created for the mapping then we can use those sessions to debug the mapping or we can create a new debug session.
 



                  
                  Select create a debug session instance and click next. Enter the connection details.
 





                   Click Next and enter the Session Config details.
 


                    Click Next , Target Options Window appears





Select the target table. Load the data into the target table or discard the data by deselecting or selecting the Discard target data option and click finish.
If mapping consists of mapplet, select the mapplet to view the data flow of the mapplet and debug. Click ok.
 



The Debugger opens in the designer as it is integrated with it. 

Debugger Interface

       Debugger consists of following Windows
a.       Instance Window : View how data is transformed in a transformation.
b.      Target Window :  View what data is getting inserted, updated, deleted or rejected into the target instance.
c.       Mapping Window : The dataflow between transformations can be viewed.
d.      Debugger Log : This window shows logs from the Debugger.
Below screenshot shows the windows in the Mapping Designer.




To start the debugger process, go to toolbar--> Debugger-->Next Instance or press F10





The data in the current transformation can be viewed in the instance window. Yellow colored arrow mark on the transformation indicates the current transformation. Repeat the above step to view data flow from one transformation to the other.
 



Finally the data in the target table can be viewed in the Target Instance window.





Note: We can modify the data in the Instance window by double clicking on the column value to check the resultant data. This helps in testing the data with expected input value.

Breakpoints

    Breakpoints are used to break the flow of the data i.e., data flow can be paused at a transformation when user wants to view the data instead of viewing whole data flow. We can setup the break points before or after starting the debugger instance. Breakpoints help to debug the issue faster.
For example, we want to see data in expression transformation for EMPID=100.
There are two types of Breakpoints
a.       Error Breakpoints: Debugger pauses when the Integration Service encounters error conditions such as a transformation error. You also set the number of errors to skip for each break point before the Debugger pauses.
b.       Data Breakpoints: Debugger pauses when the data break point condition evaluates to true. You can set the number of rows to skip or a data condition or both.
Start the Break point Window from Mapping -> Debugger -> Edit Breakpoints or press Alt+F9 
  



The Breakpoint window opens, select the transformation on which breakpoint is to be created and click on add and in the conditions tab click the Add new column to this table button and enter the condition click ok.




Red colored stop symbol appears on the transformation indicating that breakpoint has been created on it. When the debugger processes the data, flow stops at the breakpoint. Similarly we can create Error Breakpoint.

Evaluating Expression

          We can validate expression condition defined in mapping to see whether it is returning the expected output while debugging the mapping. Right click on a transformation and click evaluate expression in the expression editor; enter the expression which you want to evaluate.





The expression output will be displayed in the output window.





Conclusion :

Repeat the above process for identifying the issue.
The mapping should be in valid state for debugger to work.
It might not work properly for complex mappings.

 

 

1 comment:

rmouniak said...

Nice post! This blog gives very important info about BI tools
Thanks for sharing Informatica Online Training