Skip to main content
Solved

Calculate/lookup column text value based on 5 other text columns in CSV

  • February 17, 2016
  • 2 replies
  • 24 views

Hello everyone!

I am extremely new to FME Desktop (2011). I've been playing with it for the last few days. I am at a point where I would like to ask for your help! I would really appreciate all your suggestions/answers.

Background:

Currently, I'm trying to modify an existing workbench. This workbench grabs data from an Oracle database. The data goes through a series of transformers: Joiner -> AttributeClassifier -> 2DPointAdder -> ListExploder -> FeatureMerger (where another Oracle table is merged) -> ListExploder_2 -> FeatureMerger_2 (where a new CVS file, with 277K rows, is merged) -> ListExploder_3 -> AttributeFilter -> MapInfo TAB file.

Current Situation:

The above seems to be running okay for a small subset of data (1000 rows from Oracle).

There is another CSV file (60+ rows of lookup data) that I would need to merge into the existing workbench. (Creating another table in the Oracle database might be a better solution for this lookup table. But for now, I'm just trying to do a proof of concept.)

In this lookup CSV file, there are 5 text columns and a "Result" column. The existing workbench also contains the same 5 text columns.

The question that I'd like to ask: Is there a way to evaluate/lookup/compare the data produced by the existing workbench against these 5 columns in the lookup CSV to see if there is a match? If there is a match, then write/populate a field/attribute with the lookup CSV's "Result" column value. This value would be part of the MapInfo TAB file.

My apologies for the long post and for my possibly incorrect FME terminologies.

Sincerely!

Best answer by takashi

Hi, I would create a new attribute which stores a string concatenating the 5 column values ("text1_text2_text3_text4_text5") for both requestor and supplier, and then merge the features with the FeatureMerger using the attribute as join key.

In FME 2013+, the FeatureMerger allows you to set multiple join key attributes. Consider upgrading FME version if possible.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • February 17, 2016

Hi, I would create a new attribute which stores a string concatenating the 5 column values ("text1_text2_text3_text4_text5") for both requestor and supplier, and then merge the features with the FeatureMerger using the attribute as join key.

In FME 2013+, the FeatureMerger allows you to set multiple join key attributes. Consider upgrading FME version if possible.


  • Author
  • February 23, 2016

Hello, Takashi! Thank you! Concat value comparison seemed to have work fine. I've just upgraded to FME 2014 and am playing with the new FeatureMerger.

Thanks, once again!


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