Skip to main content

I would like to rename a large dataset of many columns using a lookup file (csv or xlsx) - is this possible? I have explored the ..Mapper transformers, but am unable to get them to work in this way. The only method that appears possible at the moment is through the AttributeRenamer, but am finding this rather tedious entering one by one. The Import facility on this transformer only appears to name Input and Output Attributes with the same names when I use it.

Happy to be corrected in my use of this transformer!

The column name lookup I have structured in a spreadsheet as below;

Capture

There's the SchemaMapper (which I guess you've looked at?) that was more or less invented for this purpose, but it's not the simplest transformer, I'll admit. There is a very helpful tutorial that's pretty much mandatory reading, I'd say: https://community.safe.com/s/article/schemamapper-transformer-tutorial

After the SchemaMapper you could follow up with a SchemaSetter (from the FME Hub) and finally a dynamic CSV or Excel writer.


There's the SchemaMapper (which I guess you've looked at?) that was more or less invented for this purpose, but it's not the simplest transformer, I'll admit. There is a very helpful tutorial that's pretty much mandatory reading, I'd say: https://community.safe.com/s/article/schemamapper-transformer-tutorial

After the SchemaMapper you could follow up with a SchemaSetter (from the FME Hub) and finally a dynamic CSV or Excel writer.

That is very helpful thank you, having a quick look at the tutorial it appears as though I need to restructure my lookup table to make use of keywords that FME would recognise - not super intuitive without looking at the help - but it should work. Thanks for your assistance David! I did look at the help pages, but did not come across the link you have forwarded, so this will save a lot of time - very much appreciated!


That is very helpful thank you, having a quick look at the tutorial it appears as though I need to restructure my lookup table to make use of keywords that FME would recognise - not super intuitive without looking at the help - but it should work. Thanks for your assistance David! I did look at the help pages, but did not come across the link you have forwarded, so this will save a lot of time - very much appreciated!

I agree about the SchemaMapper, it's one of those "old" transformers that really demands that you understand how it works before using it.

If you're stuck with a transformer it can often help to just search for the transformer name here: https://community.safe.com/s/documentation

If you search for SchemaMapper, that article is the first one that pops up.


Reply