Skip to main content
Question

How to find an attribute from a list in db records

  • September 5, 2018
  • 1 reply
  • 5 views

Forum|alt.badge.img

Hello,

I have a list of countries in csv format e.g.: ALBANIA, AUSTRALIA, COLOMBIA, CHILE, NORWAY etc. and I have some records I'm reading from a database. I would like to find out if the description part of these records contains one of these countries from the csv. A description could be : CHINESE NOTICE 14/261; JAPANESE NOTICE 28; GERMAN NOTICE 23; COLOMBIAN NOTICE 172; SWEDISH NOTICE 593; GREEK CHART 311; AUSTRALIAN NOTICE 993. So the country name is not necessarily complete (Chinese, Swedish) or the description is longer than the country name (Japanese, Australian). Any tips what transformer to use? Thanks!

1 reply

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • September 5, 2018

Hi @kat Instead of trying to calculate the adjective from the name (or vice versa) I'd recommend importing a list of country names and adjectives. I found a couple at https://en.wikipedia.org/wiki/List_of_adjectival_and_demonymic_forms_for_countries_and_nations and https://siteresources.worldbank.org/TRANSLATIONSERVICESEXT/Resources/CountryNamesandAdjectives.doc Then use an AttributeValueMapper, FeatureMerger, or FeatureJoiner to relate your csv list to your database.


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