Skip to main content

I have merged a spreadsheet with a points dataset. The spreadsheet contains multiple records which will merge with a single point. There can only be a single point and we need to store each set of records on the relevant feature. To do this the requirement has been specified that each records attributes will be stored with a prefix, e.g. 1_AttributeA, 1_AttributeB, 2_AttributeA, 2_AttributeB etc. The maximum number of records in each spreadsheet is unknown so I have used a ListElementCounter to identify this and then a ListIndexer inside a custom loop transformer which should prefix the attribute names for each set of features. FME Inspector shows the attribute names correctly as above, but when output to a file the attribute names are shown e.g. @Value(Prefix)AttributeA. AttributeRenamer and AttributeManager can't handle the output either, indicating in red that the attributes don't exist.

Any ideas?

Thanks!

is the destination attribute (Prefix) exposed in the output port of the transformer?


Because the attribute name is dynamic, it cannot readily be manipulated on the workspace canvas, which is why you're having trouble with the AttributeRenamer and AttributeManager. The Automatic Attributes on the writer will likewise have problems.

 

 

You can however use the custom transformer SchemaSetter and use dynamic attributes to get the correct attribute names.

is the destination attribute (Prefix) exposed in the output port of the transformer?

Hello @itay the 'Attributes To Output' is set to 'All Attributes' but the attribute names listed all start with @Value(Prefix)... not 1_, 2_

is the destination attribute (Prefix) exposed in the output port of the transformer?

@itay I've now included an AttributeExposer with all the possible names before the Output, and it now seems to work.
@itay I've now included an AttributeExposer with all the possible names before the Output, and it now seems to work.
Glad to hear

Reply