Question

How to update attribute from a shapefile using excelfile? I have serveral attributes thats need to be updated and want to do this in one transformer if possiable.

  • 30 September 2021
  • 2 replies
  • 2 views

Badge +1

The thing I want to do is for example to when AGOSLAG(pic 1) = Kodvarde update AGOSLAG to the text Kodlang(pic 2). Then I want to do the same thing for MALKLASS, HKL. I have serveral tables in excel and they all start with the number 1.

 

I've tried with databasejoiner but could only update 1 attribute at the time there. I have about 20-30 attributes that need to be updated.

 

What is the best way to solve this problem?

 

best regards

Jesper


2 replies

Badge +15

Hi @flugan87​,

 

it sounds like you want to do 20-30 joins on different attributes with different tables. If that's the case I'm afraid the easiest solution is using 20-30 DatabaseJoiners. If you don't want to use that many transformers, an alternative would be using an InlineQuerier, but that would require some SQL knowledge to build a JOIN query on 20-30 tables.

 

Best regards,

Francisco

Badge +2

@flugan87​ Use the AttributeExplder to split all your attributes into separate name/value pairs. You can then do the look up. then you can rename the attribute using AttributeCreator (use 'Attribute Value' for trhe New Attribute) and then Aggregate everything back together. You won't see the new attributes in the Table View, but they will be there in the Feature information window of Visual Preview or Data Inspector. (very similar process to what we do to transpose tables)

I've attached an example workspace (FME 2021):

Reply