Debugging in Informatica

 In Informatica, debugger is a very useful tool. When we execute the mapping, the mapping is executed by Informatica based on the given transformation logic.

The execution is close to the execution of batch mode, where we can't see the intermediate outcomes, or how the data is moved from transformation to transformation.

Many times we get the data that isn't as we planned in the goal. With debugger support, we can examine how the data moves within the visualization. In a debugger, we can search the data row by row.

To get in-Depth knowledge on Informatica you can enroll for a live demo on Informatica online training

Using debugger requires a session instance, either we can reuse an existing session that was created to run the mapping earlier, or we can create a new debug session instance. Since the data will be retrieved from the source during debugging, we have the choice of what to do with that data.

We can either dismiss the data, or

You can load the data inside the target

These options can be set during debugger setup.

In Informatica designer there are two windows to control the debugger

·         Window Target

·         Instance fenster

The target record which is to be inserted into the target table will be shown in the target pane. For example window, you can select any of the mapping 's transformation instances. After that, in this window, all the ports of that transformation are visible and you can analyze the data, how it gets transformed.

Steps to apply debugger to a mapping

Informatica designer provides a functionality for debugging mappings using the debugger. The debugger prerequisite is for the mapping to be a correct mapping.

In the exercise, we 're debugging our existing "m emp emp target" mapping that we created earlier. We will check in our source data for a specific employee name record = 'SCOTT'. For Scott, we will verify the values are retrieved in Informatica and whether or not the record is correctly pushed to the target.

So looks our root data for the table "emp."

For the "SCOTT" ename, we will check that in the Informatica, which value for the "sal" (salary) column is obtained using debugger.

Step 1

Open Informatica designer and open the "m emp emp target" mapping in the designer by double-clicking it. It will show mapping inside Mapping Designer to open source qualifier and target definition tables.


Step 2

Start the debugger now

Click the Option Mapping menu

From the options select Debugger

Select choice 'Start debugger'. Learn more from Informatica training


Step 3

Select next window for debug mapping.

Step 4

You will be given an choice to pick the type of session in the next window. You may use existing session, new reusable session or build an instance for debug session.

Informatica will use the earlier session that you built for this mapping while using the current session. Once you pick the instance to build debug session, a new client instance is created to debug.

In this example, we will select existing instance of reusable session. The default will be the Integration provider.

Click on next button


Step 5

In the new window, Informatica will prompt you to select the current debugging session.

Select "s m emp target" session and click on next button

Step 6

There will be an option "Discard target data" in the next window, we select this option as we do not want to load any data into our target table during debugging.

Select "Discard target data" option.

Select "emp target" destination table

Click Terminate button.

You have configured and started the debugger using the above steps. We can now debug the mapping.

Step 7

It started the debugger, but it didn't get any rows from the source. It fetches data from source row by row during debugging. To start fetching from source first row

From the menu select Option Mapping

Pick Choice Debugger

Select option Next Instance

Step 8

The first fetched record from the source qualifier will appear in the instance window.

If you analyze the instance window, the first record-ename "SMITH" row will be displayed. That is not the record we are looking for. So we can move to the next case.

Step 9

Go to next instance (pass next row)                                                                                          

Press F10 button (shortcut to next instance, then debugger option instead of mapping option)

The data in instance window will change to next record after moving to next instance.

Step 10

Press F10 button until the correct "SCOTT" employee record is reached. Upon reaching that point, the instance window will be as shown below

That is the instance we've been looking for. So we can analyze the data in the instance window. Whether it is coming properly or lacks any meaning.

The "SCOTT" employee's information in the source data were like Work = "ANALYST," manager I d = "7566," sal "3000."

And in the debugger, we've analyzed all of these information for the employee "SCOTT," and they fit the source data, so we're satisfied that the documents were correctly obtained by source qualifier.

In debugger, using breakpoint

If we are looking for a specific row of data as in the previous example, then we can define breakpoints instead of going to every source data instance.

A breakpoint is a condition or collection of a condition that is specified during debugging configuration, so that when this condition becomes true the debugger stops that particular instance.

For instance, if we define deptno=20 in a breakpoint, then whenever this condition is true for a record, the debugger will stop at that data instance.

Step 1

Setting the breakpoint

Go to Menu Mapping

Pick Choice Debugger

Choose "Edit Breakpoints"

Step 2

As shown below, you will see a "delete breakpoint" window

Step 3

Click the Add button in the breakpoint window

Step 4

In the New Fenster

As an instance select SQ EMP

Click OK button

Step 5

As shown below, the previous window will look as follows.


Step 6

You have got a breakpoint, now you need to define the breakpoint. Defining condition at breakpoint

Click "Add New Condition" button.

A new row will appear under the tab on condition. We can configure the condition here.

Step 7

In Table of Condition

Pick the option "ENAME" in port drop-down (as we debug for record ename='SCOTT')

Please enter "SCOTT" in the value file.

Click OK button

Step 8

Start the debugger now, as mentioned in the previous subject

Go to the Map menu-> select debugger option-> select debugger start-> select instance of session

Step 9

Starting the debugger

Pick Menu Mapping

Pick Choice Debugger

Select Option Continue

The debugger will go to each row instance itself and check for the "ename = SCOTT" condition The record the debugger must halt on that instance for which this condition is valid. So when the volume of data is high, you can create a breakpoint instead of going for each source record say, and you can directly jump to that record.

The debugger will be stopped automatically once the Informatica is done with going through all the instances. If you want to re-analyze the data you must restart the debugger.

Tracing in Information Technology

Whenever a mapping session is executed, a log of the session is generated. It consists of the execution details, like

·         Timing of happenings

·         Mistake Info

·         Statistics of Individual Transformation etc.

You can configure and set how much detail Informatica writes inside the session log within the transformations of a mapping.

Conclusion

I hope you reach to a conclusion about Debugging in Informatica. You can learn more through online informatica training

Comments

Popular posts from this blog

What is Power BI: Architecture and Features Explained

Fundamentals of Blockchain Network Security

Informatica BDM