Skip to main content
Question

FeatureTypeFilter after SQLCreator

  • September 9, 2015
  • 2 replies
  • 13 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

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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!

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