Skip to main content
Can the Generic (Any Format) Reader handle an arbitrary schema or is it limited to a fixed schema?

 

 

This quote from the FME 2014 documentation suggest that it should handle arbitrary schema:

 

"... and is very useful for solving problems when the input format and schemas are not known at design time."

 

 

However I have a workflow with Generic (Any Format) Readers that throws an error when I change one or more of the input datasets when testing. The error is:

 

 

"During translation, some features were read that did not match a reader feature type in the workspace.

 

This can happen if the reader is changed, or a reader feature type removed or renamed."

 

 

"The following unexpected feature types were read:"

 

.....

 

 

My workflow checks for a number of data problems.  There are two datasets: a reference dataset and a dataset to check. The reference dataset and the one to check are each used by a Schema (Any Format) Reader so I can check schema differences and a Generic (Any Format) Reader for finding attribute and geometry problems.

 

 

I am using FME 2014 build 14290 on Windows 7 64bit.

 

 

Philip
Hi Philip,

 

 

Try checking the Merge Feature Type option in the reader feature type.

 

 

 

 

Takashi

  Setting the Merge Filter made the difference. Thank you for your help Takashi.

When you are not expecting to see something it is easy to miss it.  In my defence, if this was set by default then the Generic (All formats) reader would behave like the overview of this reader in the FME documentation.

 

 

Philip

 


I think there's some confusion in our documentation there, between Generic and Dynamic.

 

 

Generic will read any format of data, with a known schema.

 

Dynamic will read a known format of data, with any schema.

 

 

So, by setting that parameter you are combining the two. You are getting a Dynamic Generic Reader! That's how it can handle both format and schema.

 

 

This blog post may help explain better: http://blog.safe.com/2010/02/fmeevangelist54/

 

 

I hope this helps and I will check the documentation and file a problem report if it's not correct.

 

 

Regards

 

 

Mark

 

 

Mark Ireland

 

Product Evangelist

 

Safe Software

Reply