Debugging Data Flows

Objective

After completing this lesson, you will be able to troubleshoot data flows by using the interactive debugger to identify and resolve data issues.

The Interactive Debugger

If you find that the resulting data is incorrect, you can execute the job step-by-step to identify the cause.

The Designer features an interactive debugger that helps you troubleshoot jobs by placing filters and breakpoints within a data flow diagram. This tool allows you to examine and modify data row-by-row during execution.

By running a job in debug mode, you can navigate through the data flow to inspect each step and view the underlying data.

In debug mode, the Designer opens several panes that comprise the interactive debugger: Call Stack, Trace, Variables, and View Data, as shown in the following figure.

SAP Data Services debugger with view data, call stack, trace and debug variables panes.

View Data Pane

The left View Data pane displays the source table data, while the right pane shows the rows processed by the query up to the breakpoint.

Start the Interactive Debugger

  1. In the project area, right-click the job and select Start Debug.

    The Debug Properties dialog box appears.

  2. Configure the execution properties:

    Most settings are identical to a standard job execution. Additionally, specify the number of rows to sample in the Data Sample Rate field.

  3. Select OK.

    Debug mode begins. While active, other Designer features are read-only, and a Debug icon appears in the taskbar.

  4. If you have set breakpoints, use Get Next Row in the interactive debugger toolbar to advance to the next breakpoint.
  5. To exit debug mode, go to the Debug menu and select Stop Debug.

Filters and Breakpoints

To manage large datasets, you can examine a specific subset by adding filters and conditional breakpoints.

You can set filters and breakpoints on the connection lines within a data flow diagram before starting a debugging session. This allows you to examine and modify data row-by-row during the execution of a job in debug mode, as shown in the following figure.

A debug filter works like a simple Query transform using a WHERE clause. Use filters to reduce the dataset during a debug job execution. Note that debug filters do not support complex expressions.

A breakpoint is a specific location where the debug job execution pauses and returns control to the user. You can base a breakpoint on a specific condition or configure it to trigger after a set number of rows.

Place filters or breakpoints on the lines connecting a source to a transform or between two transforms. If both are set on the same line, SAP Data Services applies the filter first. Consequently, the breakpoint only applies to the rows that meet the filter criteria.

Data flow workspace with Set Filter/Breakpoint dialog.

Set Filters and Breakpoints

  1. In the Data Flow workspace, right-click the line connecting two objects and select Set Filter/Breakpoint from the context menu.
  2. In the Breakpoint window, use the Column dropdown list to select the column for the filter or breakpoint.
  3. In the Operator dropdown list, select the required operator for the expression.
  4. In the Value field, enter the value to complete the expression.

    Note that conditions for filters and breakpoints do not require delimiters for string values.

  5. If you are using multiple conditions, repeat steps 3 through 5. Then, select the appropriate operator from the Concatenate all conditions using dropdown list.
  6. Select OK.

Use the Interactive Debugger

Follow this simulation to learn how to use debugger filters and breakpoints:

Summary

In this lesson, you have learned how to use the debugger to detail your jobs executions.

  • Use the Designer's interactive debugger to troubleshoot jobs by examining data row-by-row during execution.
  • Once in the debugger, you can access Call Stack, Trace, Variables, and View Data panes to inspect each step of the data flow.
  • Apply filters and conditional breakpoints on connection lines before debugging to examine specific data subsets efficiently.