Exercise 4b | Unexpected Input |
---|---|
Scenario | FME Workspace Author |
Data | Contours (Esri Shapefile) |
Overall Goal | Read a set of contour shapefiles |
Demonstrates | Unexpected Input |
Start Workspace | None |
End Workspace | C:\FMEData2015\Workspaces\DesktopBasic\Exercise4b-Complete.fmw |
This example merely reads a file of contour data, but demonstrates a potential problem when changing the source dataset parameter.
1) Inspect Data
Start the FME Data Inspector and open the datasets:
Reader Format | Esri Shapefile |
Reader Dataset | C:\FMEData2015\Data\ElevationModel\Contours\*.shp |
In other words, select all of the Shape files in that folder.
You'll see that the contour data - because of its size - has been split up into a grid of files.
2) Create Workspace
Start FME Workbench and begin with an empty workspace. Select Readers > Add Reader from the menubar.
When prompted enter the format and dataset for ONE of the contour files, for example O9.shp.
Add an Inspector and run the workspace to ensure it works as expected.
3) Change Dataset
Now we'll assume that someone else has asked you to translate a different file, for example L2.shp.
So, locate the source dataset parameter in the Navigator window:
Double-click the parameter and a Source Shape File dialog opens up. Use the browse button to select L2.shp
4) Run Workspace
Run the workspace. You will get a dialog pop up reporting that there was "Unexpected Input":
What this means is that you've tried to read a layer of data that is not defined in the workspace.
Congratulations!
You have now:
- Modified the Reader dataset parameter
- Discovered a potential problem of modifying the Reader dataset parameter!