Skip to main content
Question

FeatureTypeFilter after SQLCreator

  • September 9, 2015
  • 2 replies
  • 27 views

Hi,

 

 

I'm trying to use same transformers for few feature types abtained by different SQLCreators. At the end, I want to use FeatureTypeFilter, but it doesn't find any feature types. What is goring on and ai there some solution for this?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • September 10, 2015
Hi,

 

 

The SQLCreator gives its own name (i.e. the value of "Transformer Name" parameter) to every output feature as feature type name.

 

 

If the SQLCreator retrieves features from only one table, you can set the table name (feature type name) to its "Transformer Name" parameter, so that the feature type name becomes the table name.

 

 

Otherwise (if the SQLCreator retrieves features from two or more tables), add a field that contains the table name explicitly in the SQL statements,  and then rename the field (attribute) to "fme_feature_type" by an AttributeRenamer.

 

e.g.

 

FME_SQL_DELIMITER ;

 

select *, 'MyTableA' as feature_type_name from MyTableA;

 

select *, 'MyTableB' as feature_type_name from MyTableB; 

 

 

Takashi

  • Author
  • September 10, 2015
Hi Takashi,

 

 

The problem was that FeatureTypeFilter doesn't create ports itself when I hit update. Insted of updating, I just filled ports myself and it works.

 

 

Thanks!