Skip to main content

I have created a very simple list using the list builder that contains multiple values of the same key (stationId). 

the list looks like this in fme inspector: 

0684Q00000ArFXDQA3.jpg

I want to pass all the statonIds in this station list into the sql executer transformer into my WHERE statement.  The sql executer recognizes this list however, it only allows me to specify a specific element number in the list like this:

 where originstationId in (@Value(StationList{0}.stationId))

The problem is I don't know how many values will be in the list each time so I can't hard code the list element number in it. I would like to pass all values in this list into my query.

Hi @adriano_n90, you can use the ListConcatenator transformer to concatenate every element in the list using a specific delimiter (typically a comma) and store it into a new attribute. You can then build the SQL statement using the concatenated value.


Hi @adriano_n90, you can use the ListConcatenator transformer to concatenate every element in the list using a specific delimiter (typically a comma) and store it into a new attribute. You can then build the SQL statement using the concatenated value.

Thank you! I knew I was missing something.

 

 


Reply