Question

Creating new attribute from Feature Type Name


Hi All, I'm trying to amalgamate records from several tables into one with only 2 attributes - the ref (from the originating table) and the table name (created using the Feature Type Name from the originating table). However, when I try this the Tablename attribute contains the full path for the file not just the table name.

 

 

Can anyone help me with this one?

 

Thanks.

4 replies

Badge +3
what input type and wich transformers (and how) are you using to do this?

 

 

It is of course alwyas possible to use regualr expressions to get the name

 

(something like .*\\\\([\\w\\d]+).\\w{3} should do to get the filename), but it should not be nescessary to do that i think)
Hi Gio, I'm reading MapInfo tables and writing out to MapInfo. All I'm doing is using the AttributeCreator to receive all the tables and I need to know how to get the 'Feature Type Name' as the value in the new attribute. I don't think it should be difficult, just a matter of the expression formatting.

 

 

 
Userlevel 2
Badge +17
Hi,

 

 

FME readers always add feature type name attribute called "fme_feature_type" to every feature. You can use it.

 

Open the Feature Type Properties dialog, go to Format Attributes tab, and check Exposed check box of "fme_feature_type".

 

 

 

Takashi
Hi Takashi, Perfect! Just what I needed! Thank you, AA

Reply