Question

FeatureTypeFilter after SQLCreator

  • 9 September 2015
  • 2 replies
  • 4 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?

2 replies

Userlevel 2
Badge +17
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
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!

Reply