Skip to main content
Solved

How to use the "import" function to define attributes?

  • November 18, 2022
  • 2 replies
  • 57 views

Hi everyone,

 

I am trying to create a set of new attributes with the Attribute Creator. I would like to use the "import" option to bring the attributes from a CSV file. However, the transformer reads the attribute values as a "text" and not as Arimethic function (See picture for clarification ). Any idea on how to change that quickly?

Or any better idea to obtain the same result?

I mean create the following attributes:

 

Name Attribute

Y1 =A1+B1

Y2 =A2+B2

Y3 =A3+B3

Thanks in advance!.

 

question FME

Best answer by nielsgerrits

You can use the function @Evaluate() to do this. 

Create a CSV like 

Name,Value
A,@Evaluate(1+1)

Click Import...

Select CSV

Choose import from Attribute values

Select Name for New Arribute and Value for Attribute Value.

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • November 18, 2022

You can use the function @Evaluate() to do this. 

Create a CSV like 

Name,Value
A,@Evaluate(1+1)

Click Import...

Select CSV

Choose import from Attribute values

Select Name for New Arribute and Value for Attribute Value.


nielsgerrits wrote:

You can use the function @Evaluate() to do this. 

Create a CSV like 

Name,Value
A,@Evaluate(1+1)

Click Import...

Select CSV

Choose import from Attribute values

Select Name for New Arribute and Value for Attribute Value.

Thank you. It's working now. 


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