Skip to main content
I'm upgrading from FME 2010 to FME 2013 and i'm a bit confused on which way to set an attribute to the value of another attribute.

 

 

i previously setting attributes using the AttributeSetter, but I had a lot of them, so I thought I could use the new functionality of the AttributeRenamer and reduce the transformer count in my workspace.

 

 

I want the attributes A, B, C to have the values in attributes 1, 2, 3. 

 

 

So I have the Attributes 1/2/3 defined in the Old Attribute column, and Attributes A/B/C in the Default Value column.  (Is there a way to post a JPG of this?)

 

 

Do I have that right?  Or is it the other way around?

 

 

Thanks.

 

Sarah

 

Hi Sarah,

 

 

your example is correct. The source (existing) attribute values goes in the "Old Attribute" column, while the target (new) attribute names go in the "New Attribute" column.

 

 

David
David, thanks for replying.  But you'll notice in my post i'm referring to the Old Attribute and Default Value columns.  Not the New Attribute column. 

 

 

I have my transformer looking like this:

 

Old Attribute                   New Attribute     Default Value

 

Attribute1 (value: cat)                                AttributeA

 

Attribute2 (value: dog)                               AttributeB

 

Attribute3 (value: bird)                               AttributeC

 

And I want these results:

 

  AttributeA = cat

 

AttributeB = dog

 

AttributeC = bird

 

  I hope that clarifies.  Do I have that right?

 

Note: All attributes already exist coming into the AttributeRenamer.  And each have values, but I want the cat/dog/bird values to be put in AttributeA/B/C.

 

 

Sarah
Hi,

 

 

You might benefit from the new conditional processing introduced in FME 2013.

 

Hope this helps
Hi Sarah,

 

 

Reading your reply, it still seems like you want to rename Attribute1 to AttributeA, while keeping the value "cat".

 

 

If so, you would normally do the following:

 

 

AttributeA goes into the "New Attribute" column and Attribute1 goes into the "Old Attribute" column.

 

 

Which is what I replied initially :-)

 

 

Hint: if you're unsure about how things will behave at run-time, have a look at the feature introduced in FME 2011, feature inspection. It allows you to pause the process at at set point and to inspect all the attributes. Very handy!

 

 

David
I really just want to set the value of AttributeA/B/C.  i don't care what happens to the names of Attribute1/2/3. 

 

 

yes I've played with the Feature Inspector and its a great tool. I just downloaded and installed 2013/SP1 also so i'll have to check out the conditional formatting Itay was referring to.

 

 

David, i'll give the New Attribute column a whirl.

 

 

Sarah

Reply