Skip to main content

Hi guys,

I'm stuck with one problem and looking for advice. I have two CSV tables. I'm trying to replace attribute values from first table with ones from second table. Let me try to summarize...

Table no. 1

Parcel number Use of land

1 101

2 101

3 201

3 210

Table no. 2

Use of land Description

101 House

201 Business building

210 Church

So, first table is organized by parcel number and there can be multiple uses of land. There is a more than thousand features in this table. The second table just adds description to the use of land identifier (house for 101 etc.) and has 103 different features.

I need to replace Use of land attribute values in first table with Description attribute values from second table so the first table looks like:

Parcel number Use of land

1 House

2 House

3 Business building

3 Church

I've tried attribute creator with conditional value assining, feature merger and nothing worked so far. I get empty values for Use of land attribute. Hope someone can help. Thanks in advance.

Best regards

JJ

Hi @jjaksic22, I think the general approach is: firstly merge the "Description" from the second table to the first table using "Use of land" as join key, then rename "Description" to "Use of land". Take a look at the FeatureMerger and the AttributeRenamer.

Alternatively, the DatabaseJoiner (called Joiner in 2016 and earlier) or the InlineQuerier can also be used instead of the FeatureMerger.


Thanks @takashi,

it worked with feature merger as you explained.

Best regards


If you have your second table as csv or similar, and it is fixed/constant you could also use an AttributeValueMapper, using the import function to load the values you want to map.

 

The FeatureMerger makes it easier to manage the mapping externally however.