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!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

1 reply

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • 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.