Four Stars

Looping through SQL results

I'm wanting to do a SQL query that will give me a list of values
Then I want to do a process for each returned value where I do some further lookups based on the value, and a denormalize in order to batch the further lookups together.
I need to only look at one initial value at a time due to the denormalize. (At least I believe I have to do it that way)
Any help on ways to go about this would be appreciated, I've imagined using a tLoop, or maybe just iterating off the results, but I'm not sure how I would go about that, as I can't Iterate to a map, etc.
One Star mpa
One Star

Re: Looping through SQL results

I would use a tFlowToIterate and a tFixedFlowInput.
In tFlowToIterate you should disable the default and add a key choosing your column name that contains your list of values. (001,002..)
In your tFixedflowInput you should put the number of rows to 1 and add a column containing the following as value: ((String)globalMap.get("Key Name in tFlowToIterate ")).
So I guess your job would look something like:
tMssqlInput --> tFlowToIterate -(Iterate Link)-> tFixedFlowInput --> Tmap (for your lookups) --> ..
That's how I would do it.