Basic Debugging 102
How can we introspect data within our data flow? We’ve determined that there’s a problem, but it’s not easy to see the processing looking at a static picture.
Publisher as Debugger
The values moving around inside the data flow are know as parameters and each can be,
- <empty>, no value has ever been assigned
- Some value
We can use a Publisher to look at the values at various points throughout a data flow. Let’s look at a scenario where we have data coming in, we’re breaking it up with a decommutator, processing parameters in an evaluator, then we can use the values for various purposes.
Decommutator
We know we’re having an issue downstream from our evaluator, so how can we isolate the problem? First let’s investigate if our decommutator is giving us what we expect; perhaps we’ve got an incorrect setup there. We’ll hang a Publisher off the decommutator like this,
Now we can look at the subscriptions that get created using a tool such as Subscription Browser or Subscription Table. The browser gives us a view of the current value while the table displays a table of up to 100 of the most recent values.
For the table, click Configure Subscriptions… to select and format your values. With Subscription Browser, you can drag/drop the subscriptions or double click individual ones.
Choose parameters and verify that the values are coming out as expected. The Live switch in the table’s menu bar allows you to pause the display’s updating.
Evaluator
If everything looks fine in the first box, we need to move down to the next where we’re changing values with our evaluator. Move the Publisher, or add a new one.
Now you will be viewing the values as output by the specific Evaluator. By using a Publisher, you can target specific areas of the data flow to see parameters.
But what if you have packets or frames you need to inspect? These don’t work well viewed as subscriptions, Instead, let’s use a Pull Writer (why pull?). A pull writer will allow us to open and read the bytes.
After opening Stream Displayer, select the UNC for dfe/0/test_data.
Summary
In this article we’ve taken a look at some ways to view data moving inside the data flow.