I'm trying to create a re-usable template that uses a dynamic reader to allow it to read a table from a database, the 'connection', 'feature types to read' and 'where clause' attributes would be defined before the reader but this approach seems to be causing me problems.
The process so far looks like this...
The FeatureReader looks like this...
If I define the connection, table and where parameters within the feature reader everything works fine, the reader recognises the schema and creates an appropriate output port. Using the above approach and defining the same parameters as attributes doesn't create a output port (which I understand as how can it create a port for a feature type it hasn't read yet), next stop was the generic port but I can't seem to get anything useable out of this.
I've read numerous articles on here about using a feature merger to merge the schema and the generic ports but this doesn't seem to give me anything useable either. I've also tried an attribute exploder on the generic port from which does expose the schema and data but not in the format I would have expected.
Does anybody know of a way to make the feature reader act in the same way as it does when the parameters are hardcoded, that is, I end up with the data (tabular and geographic) presented in an expected schema?