Skip to main content
Question

Lookup values in a custom transformer ?

  • January 19, 2017
  • 4 replies
  • 40 views

lifalin2016
Supporter
Forum|alt.badge.img+40

Hi,

I need to convert multiple numeric codes in multiple tables into meaningful texts via a suitable "lookup table" (actually a view on SQL Server, but that's not important). Since I need to do this multiple (10+) times, I want to create a custom transformer with published parameters for input and output variables.

How do I do this ?

My attempts sofar has only resulted in an error: Undefined macro 'VAR_NAME' dereferenced in file ...

Cheers

Lars I

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.

4 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • January 19, 2017

If your lookup table is unlikely to change, you can the AttributeValueMapper transformer to do the lookup. The transformer allows you to import the lookup keys and values from SQL Server view.

If the lookup table is non-static, the Joiner transformer is better for doing the lookup.


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • January 19, 2017

What transformer are you using to retrieve the information? In the fme macro values table the custom transformer parameters are prefixed by the name of the custom transformer, and in certain cases that is not automatically resolved, leading to an undefined macro error.


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • January 24, 2017

If your lookup table is unlikely to change, you can the AttributeValueMapper transformer to do the lookup. The transformer allows you to import the lookup keys and values from SQL Server view.

If the lookup table is non-static, the Joiner transformer is better for doing the lookup.

Alas, they cannot be made fixed, although they probably rarely change. Due to the number of values alone, the values need to be read from a view in the database, hence the need to wrap it somehow.

 

 


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • April 24, 2018

Closing the question.