Solved

How do I avoid "Unexpected input" error when I change a shapefile in the reader? The message I get in part reads, " During translation, some features were read that did not match a reader feature type in the workspace".

  • 13 May 2021
  • 1 reply
  • 47 views

How do I avoid "Unexpected input" error when I change a shapefile in the reader? The message I get in part reads, " During translation, some features were read that did not match a reader feature type in the workspace".
icon

Best answer by jovitaatsafe 18 May 2021, 21:51

View original

1 reply

Userlevel 1
Badge +11

Hi @robeesafe​,

If you're changing the source shapefile but keeping the same reader, FME is still expecting the same schema as the initial source shapefile, so when it reads a different file, it's letting you know that some features are no longer matching the type it expected to get. Mark has a really good explanation of this in his blog Unexpected Input - The Toll Booth Model.

 

To avoid the error, if you're replacing the source file, try right clicking on the reader in the Navigator pane, and 'Update Reader', and under Update Options, select Update Reader and Feature Types. Another method if you're planning to change out the source data often: you can read data as 'Single Merged Feature Type' when you read in your shapefile, and it will come in as "<All>" instead of having specific feature types. Hope that helps to explain things!

Reply