AttrManager2016-7It was Benjamin Franklin who once said: “there is nothing certain in life, except death and taxes”.

Of course, they didn’t have FME in 1789, otherwise he might have said:“there is nothing certain in life except death, taxes, and the need to manage attributes”.

Yes, it might not be the most stimulating of topics, but attribute management is something we all do with FME. We add attributes, delete them, change their names, edit their values, cut, copy, paste, concatenate, and so much more besides.

And in FME 2016 there is one transformer to do all that for us. It’s the ultimate FME multi-tasker. The AttributeManager!

EvangelistBanner7

What Can It Do?

There are a number of tasks this new transformer can carry out, specifically:

  • Create attributesAttrManager2016-8
  • Rename attributes
  • Copy Attributes
  • Remove attributes
  • Set attribute values
  • Reorder attributes

Therefore you can say it replaces the:

  • AttributeCreator
  • AttributeRenamer
  • AttributeCopier
  • AttributeRemover (and AttributeKeeper)
  • ListRenamer

…and if you consider that the AttributeCreator itself replaces some transformers, you can also use the AttributeManager in place of:

  • StringConcatenator
  • ExpressionEvaluator
  • AreaCalculator, AttributeRounder, etc, etc (there are lots of things it can do!)

Really, that’s all you need to know. There’s not a lot of technical info I can add here. The important part is that you are aware of the transformer. But I’ll run through a few parts of the parameters dialog anyway…

EvangelistBanner7

The AttributeManager Parameters Dialog

Here’s the AttributeManager simply connected to a source dataset (our old favourite, the MapInfo TAB parks data):

AttrManager2016-1

First notice that all incoming attributes are automatically listed. When I first saw that I was really happy. It means I no longer have to individually add all of the attributes I want to carry out an action on. A great idea.

Now notice the far right column – the one labelled action. That’s where I can define what I am doing to an attribute:

AttrManager2016-2

However, I can also just make edits and the action field will match what I have changed. For example, if I rename NeighborhoodName to Neighborhood (by just setting the Output Attribute to have a different name), the action changes accordingly:

AttrManager2016-3

So, if I put a value into the Attribute Value field, it becomes a “Set Value” action. That value – like the current AttributeCreator – can be a fixed value, the value of another attribute (effectively an attribute copy); or I have the usual abilities to use a text or numeric editor, set it to null, set it to a user parameter, or use conditional values:

AttrManager2016-4

To create a new attribute I enter it into the the foot of the list – and of course I can then set a value for it using any of the above methods. I can also remove an attribute by simply deleting it. In a rather nice touch, instead of it disappearing from the dialog, it remains in place, but with no Output Attribute listed.

Finally, there are up/down arrows on the dialog so I can reorder my attributes. So, with a bit of editing, my original attribute list might look like this:

AttrManager2016-5

Notice the attribute list on the transformer is updated to match what I have defined in the parameters dialog, even the order of the attributes.

Oh! Two parts I almost forgot. Firstly, lists. This transformer isn’t designed to expose and manage individual list elements, but you can carry out actions on the list object itself. For example, I can rename myList{}.myAttribute to yourList{}.yourAttribute.

Secondly, this transformer has the parameters for fetching attribute values from neighboring features (as the AttributeCreator does), plus the ability to carry out substitution of missing, null, or empty attributes:

AttrManager2016-6

EvangelistBanner7

Summary

So that’s about it. Probably one of the shorter posts I’ve written, but the transformer is simple to understand and you don’t need to be a modern-day Benjamin Franklin to use it. I predict that in a short time it will appear at the very top of our most-used transformers list; possibly even overtaking the Tester!

For more information!

CONTACT_US