Skip to main content
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".

  • May 13, 2021
  • 1 reply
  • 209 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".

Best answer by jovitaatsafe

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!

View original
Did this help you find an answer to your question?

1 reply

jovitaatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • Best Answer
  • May 18, 2021

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings