You are reading the article Debugger In Informatica: Session, Breakpoint, Verbose Data &Amp; Mapping updated in October 2023 on the website Happystarlongbien.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested November 2023 Debugger In Informatica: Session, Breakpoint, Verbose Data &Amp; Mapping
As we discussed in previous topics, a mapping is a collection of source and target objects linked together by a set of transformations. These transformations consist of a set of rules, which define the data flow and how the data is loaded into the targets.
What is Debugger?Debugger is a very handy utility in Informatica. When we execute the mapping, Informatica executes the mapping based on the transformation logic defined.
Its execution is similar to batch mode execution where we cannot see the intermediate results, or how the data is getting modified from transformation to transformation.
Many a times we get the data in the target which is not as we expected. With the help of debugger, we can analyze how the data is moving within the mapping. We can analyze the data row by row in a debugger.
In this tutorial – you will learn
The use of debugger requires a session instance, we can either reuse an existing session which was created earlier to run the mapping, or we can create a new debug session instance. Since during debugging the data will be fetched from the source, so we have the option of what to do with that data.
Either we can discard the data or
The data can be loaded into the target
These options can be set during the configuration of the debugger.
To monitor the debugger, there are two windows in Informatica designer
Target window
Instance window
In target window, the target record which is going to be inserted into the target table is shown. In instance window, you can select any of the transformation instances of the mapping. After that, all the ports of that transformation are visible in this window, and you can analyze the data, how it is getting transformed.
Steps to use debugger in a mappingInformatica designer provides the feature to use the debugger to debug mappings. It means we can debug and analyze any existing mapping. The requirement for the debugger is that the mapping should be a valid mapping.
In the exercise, we will debug our existing mapping “m_emp_emp_target” which we created earlier. In our source data, we will check for a particular record of employee_name =’SCOTT’. For Scott, we will verify the values are fetched in Informatica and whether the record is pushed to the target correctly or not.
Our source data for the “emp” table looks like this.
For the ename “SCOTT”, using debugger we will check that what value for the “sal” (salary) column is fetched in the Informatica.
Step 2 – Now start the debugger
Select Debugger from the options
Select “start debugger” option
Step 3 – Select next on debug mapping window
Step 4 – In the next window, you will get an option to select session type. You can use existing session, existing reusable session, or you can create a debug session instance.
When you use the existing session, Informatica will use the earlier session which you created for this mapping. When you select the create debug session instance, a new session instance will be created for debugging.
In this example, we will select existing reusable session instance. The integration service will be the default.
Select “use an existing session instance” option
Step 5 – In the new window, Informatica will prompt you to select the existing session for the debugging.
Step 6 – In the next window there will be an option “Discard target data”, we select this option as during debugging we don’t want to load any data in our target table.
Select option “Discard target data.”
Select target table “emp_target”
With the above steps, we have configured and started the debugger. Now we can debug the mapping.
Step 7 – The debugger has started, but it hasn’t fetched any rows from the source. During debugging it fetches data from source row by row. To start fetch first row from the source
Select mappings option from the menu
Select debugger option
Select next instance option
Step 8 – In the instance window you will see the first fetched record from the source qualifier.
If you analyze the instance window, it will be showing the first record – ename “SMITH” row. This isn’t the record which we are looking for. So we can move to the next instance.
Step 9 – To go to next instance (to move to next row)
Press F10 button (shortcut for going to next instance, instead of going to mapping option then debugger option)
After moving to next instance, the data in instance window will change to next record.
Step 10 – Keep pressing F10 button, till you reach to the required record of “SCOTT” employee. Once you reach that point, the instance window will be like as shown below
This is the instance, which we were looking for. So in the instance window, we can analyze the data. Whether it is coming correctly, or any value is missing.
In the source data, the details of the “SCOTT” employee were like job = “ANALYST”, manager id = “7566”, sal “3000.”
And in the debugger, for the employee “SCOTT” we have analyzed all these details, and they are matching with the source data, so we are assured that the records were fetched correctly by source qualifier.
Using breakpoint in debuggerWhen we are looking for a particular row of data like in the previous example, then instead of going to every instance of source data we can define breakpoints.
A breakpoint is a condition or a set of a condition defined during configuration of debugging such that when that condition becomes true the debugger halts to that particular instance.
For example if we define deptno=20 in a breakpoint, then whenever for a record if this condition is true, then the debugger will stop to that instance of data.
Step 1- To configure the breakpoint
Go to mappings menu
Select debugger option
Select “edit breakpoints” option
Step 2 – You will see an “edit breakpoint” window as shown below
Step 4 – In the new window
Select the SQ_EMP as instance
Select OK button
Step 5 – The previous window will look as shown below
Step 6 – You have a breakpoint, now you have to define the breakpoint condition. To define breakpoint condition
A new row under condition tab will appear. Here we can configure the condition.
Step 7 – In the condition table
In port drop down, select “ENAME” option ( as we are debugging for record ename=’SCOTT’)
In the value box, enter value “SCOTT.”
Select OK button
Step 8 – Now start the debugger as mentioned in the previous topic
Step 9 – Once debugger is started
Select mappings menu
Select debugger option
Select continue option
The debugger will go to each instance of row itself and will check for the condition “ename=SCOTT”. The record for which this condition is true, the debugger will halt on that instance. So when the data volume is high, then instead of going for each instance of source record you can configure a breakpoint, and you can directly jump to that record.
Once the Informatica is done with going through all the instances, the debugger is stopped automatically. If you want to analyze the data again, you have to restart the debugger again.
Tracing in InformaticaWhenever you execute a session for a mapping, a session log is generated. It consists of the details of the execution like
Timing of the events
Error details
Individual transformation statistics etc.
Inside the transformations of a mapping, you can configure and set how much details Informatica writes inside the session log.
There are four levels which can be set for tracing inside the transformations.
Different Log Modes Activities in different Log Modes
Normal
In normal mode, Informatica writes about the transformation initialization and status information, errors encountered and summarizes sessions result.
Terse
In Terse Mode, Informatica writes only about initialization information and error details. Terse mode writes minimum details into the session log.
Verbose initialization
In Verbose Initialization mode, Informatica writes the log details similar to normal mode and in addition also writes about the data and index files used and transformation statistics.
Verbose data
In Verbose data, Informatica writes log similar to verbose initialization but in addition also writes every data which passes through the transformation.
Note: By default the tracing level is set to normal, it is recommended to use verbose data mode only when you are debugging the mapping. The terse mode can be used to improve the performance, as it writes the minimum details. So the overhead of writing log will be minimum.
How to set tracing level in a transformationStep 1 – Open the mapping in Informatica designer, for which you want to set the tracing level
It will open edit transformation window.
Step 3 – In the edit transformation window
Select the Tracing level option
From the drop down select Verbose data
Select OK button
Step 4 – Save the mapping and execute the mapping ( use ctrl+s keyboard shortcut to save the mapping)
Step 5– To view the log
Open workflow monitor and select the session which was executed in the last step
This will open session log window for the mapping
The session log provides the detail about how your session got executed. It provides the timing details when execution started and stopped. It provides the basic idea about the performance. It mentions which database connection you are using, what parameter file you are using. It also summarizes about the source and targets by mentioning how many source records were fetched, how many records were loaded into the target, etc.
Step 6 – Scroll down in the log, and you can see additional log details captured including the data records.
In this way, you can set the tracing level in mappings to capture the additional details for debugging.
In this tutorial, you have learned how to set, configure and execute the debugger and how to set tracing level in mappings. These options provide you the ability to debug the mappings.
You're reading Debugger In Informatica: Session, Breakpoint, Verbose Data &Amp; Mapping
Update the detailed information about Debugger In Informatica: Session, Breakpoint, Verbose Data &Amp; Mapping on the Happystarlongbien.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!