Skip to main content
Question

Lookup values in a custom transformer ?


lifalin2016
Contributor
Forum|alt.badge.img+29

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

4 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • 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+28
  • 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
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • January 24, 2017
daveatsafe wrote:

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
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • April 24, 2018

Closing the question.


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