View stream data
While developing an application, you often want to inspect not just the overall tuple flow, but the actual data. Previously, you looked at the results file, but you can also see the data in the Instance Graph. This way, you don’t need to add FileSinks whenever you want to capture the output of a particular operator. Let’s look at the input to and output from the Filter operator to see whether it’s working as expected.
- In the Instance Graph, right-click the stream Throttled (output of the Throttled operator, input to Filtered). Select Show Data.
In the Data Visualization settings dialog, verify that the tuple type is what you expect (attributes id, time, latitude, longitude, speed, and heading) and click OK. A Properties view appears.
- Repeat the previous step for the stream Filtered between operators Filtered and Writer. Move and resize both Properties views so that you can see both tables and the Instance Graph.
Notice that, as expected, the Filtered stream contains only tuples with an ID value of C101 or C133 whereas the Throttle output contains a greater mix of vehicle IDs:
- When you have seen enough data, dismiss the two floating Properties views.
In preparation for the next lab, cancel all jobs.
- If you used the Filter graph button to hide a job in the Instance Graph, bring it back. Click Filter graph, clear all options, and then click OK.
- Select all jobs in the instance graph by holding down the Ctrl key and clicking each one. Right-click one of them and click Cancel job.
The Instance Graph should now be empty.