About Feature Inspection
- You can run all or part of a workspace in "feature caching mode" so you can see feature counts as features move across the canvas, through connections, and to output ports.
- You can inspect the properties (attributes and geometry) of an individual feature without having to send the workspace to an Inspector application.
- If you want to add a transformer, especially to a large workspace or a workspace that reads a great deal of input data, you can see the effect it will have on a feature without having to wait for the entire workspace to complete.
Run with Feature Caching and Run with Breakpoints
Workbench provides tools that allow you to inspect data at the feature level with the Feature Inspector, and at the dataset level with the FME Data Inspector. In the Workbench Run menu, two additional options allow you to run the workspace in a more controlled fashion:
- Run with Feature Caching: Run all or part of the workspace and inspect all features (together or individually).
- Run with Breakpoints: Run the workspace and inspect data one feature at a time, pausing between features (Feature Inspector).
This option seamlessly integrates the workspace with the Data Inspector. FME records features and stores them in a temporary cache. You can then inspect features individually, or all at once. When this option is enabled, you can choose to run the entire workspace, or a portion of it.
Note: This mode is particularly useful when you want to see where (and how many) features are flowing in the workspace, and for workspace debugging. However, this mode affects system resources, and, because all features are recorded and stored, it can also affect disk space. For these reasons, you might not want to run all workspaces in this mode.
All output ports record features, which you can view and inspect after the translation is finished. This example workspace shows the canvas after running with feature caching:
To view recorded features, click an inspection icon on an output port ().
The FME Data Inspector opens and shows the features that were output at that port.
To show features from multiple output ports, select one or more objects, right-click, and select Inspect cached features. This option allows you to inspect all features encompassed by the selection.
Running and Inspecting Part of a Workspace
You can select one or more objects on the canvas, and run only part of the workspace. Large workspaces, especially those that access large data sets, can take time to run in full. Running a partial workspace can save time and resources when:
- You make a change to a workspace, and you want to see quickly how the change affects your data.
- You are preparing data for input, and you want to see quickly how it looks.
You can run partial workspaces in the following ways:
- Run From This (or Selected) : All parts of the workspace that flow from a selected object (or objects) run.
- Run Just This (or Selected): Only a selected object (or objects) runs. If a collapsed bookmark is included in the selection, only the objects within the bookmark run.
- Run To This (or Selected): All parts of the workspace that flow to a selected object (or objects) run.
- Run Between Selected: All parts of the workspace that flow between the selected objects run.
Working with Data Caches
To run partial workspaces, FME caches data at the output ports of a workspace. FME caches data only when Run with Feature Caching is enabled. If any data caches are missing or stale where current ones are required, you are prompted to run all parts of the workspace that require updated data caches. This can happen when:
- The caches were not saved with the workspace, and the workspace has not yet been run in Feature Caching mode.
- You make a change to the workspace that invalidates one or more caches.
When a cache is invalid, its corresponding inspection icon turns yellow (). (You can still click on an invalid icon to inspect features, though they may no longer be valid.)
Tip: Use Junctions to create caches where data either merges, or diverges in separate streams, as a useful starting point for partial runs.
Partial caching
To conserve resources, you can prevent FME from caching portions of a workspace, if you know those portions do not require caching for producing accurate runs. Place the parts of the workspace you do not want to be cached in a bookmark, then collapse the bookmark.
Before you can view features in this mode, set at least one breakpoint in the workspace. The workspace will run until it reaches this breakpoint, and the Feature Inspector window will open.
To set a breakpoint, select a link until it is highlighted. Right-click to display the command menu and click Add Breakpoint (or press the F9 key).
A breakpoint appears in the workspace as a bold, blue line with a red "stop sign" octagon.
Note: In the example below, the number inside the octagon indicates the feature count display from the previous workspace run. If you have not yet run your workspace, the octagon displays a solid color.