possible to use tloop with dynamically changed variable for condition
Hi, I am doing a development, which requires to run mulitiple time of a job. I am thinking to use tloop with While clause. However, the requirement is the condition is coming from a variable, which may be changed. I am wondering how to use the condition in tloop while clause. Also I am wondering how to pass a variable to the sql in tPostgresInput.
Thanks,
Hi
You might use tContextLoad and load it into a context variable.
For more information, please download the document
here and get scenarios about this component.
Regards,
Pedro
Hi you suggested of using tContextLoad, which can load the properties of dbinput. I know how to make it works. My question is to enter variables in the Query, such as: Select a.id , a.registration from comprehensive a where a.registration_time between (context.time1) and (context.time2). I would to know how to assign time1 and time2. Thanks,
Hi pedro, I have got the sql that using context variables working. But when I tried to use context in tLoop with the context variable assigned to a while loop condition. I got the Exception in component tLoop_1 java.lang.NullPointerException. I am using: dbInput->tMap->tContextLoad--(onComponentOk)-->tLoop->tSleep. I am using key: run_num, value:2 in the tContextLoad. In tLoop, i am using "i<context.run_num" as the condition. I tried the same assignment with FileList. it works. I don't know why the above one doesn't work. Any help is very apprecaited. Thanks,