multiple strings as argument in table input
I'm trying to use SQL like select column from table where column in (?) as ? should be concatenation of strings. I did script, that concatenates rows in something like 'string','secondstring' and so on. I know, I should use just more parameters, but to the moment of execution I don't know, how many arguments there will be, and that is hundreds of t开发者_StackOverflowhem each time. I'd like to do it in one SQL, so putting every argument in a single row, and check "execute for each row" isn't perfect either.
Any clue, how to do this?
You can use the cycles and variables kettle. For example:
-create a job that contains:
1)a transformation where you store in an environment variable
(setVariable ("varname" value, "r")
r is the parameter to be accessible by the parent job) the concat all input rows.
2)a transformation which makes the desired query with variable replacement (SELECT column FROM table WHERE column IN (${varname})
).
If you need I can send the example files.
精彩评论