Skip to main content
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

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 5, 2015
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)

  • Author
  • June 5, 2015
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.

 

 

 

takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • June 5, 2015
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

  • Author
  • June 8, 2015
Hi Takashi, Perfect! Just what I needed! Thank you, AA

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