How to add dynamic sql queries using sql loader in yarg

Hi, I am using yarg 2.0.12 version. I want to use SQL data loader and make queries in that script dynamic. How can i make them dynamic ?

Eg.

select * from emp where age in (25, 26, 27);

how can i make above parameter (25,26,27) dynamic if i am using sql data loader. I tired using external params as below, but it is not working. should i pass values as array instead of string ?

runParams.param("tv", "1,2,3");

Hi,

You can try to put the values as list or array of strings.
The query will be turn into:
select * from emp where age in (${age}),
where the age is the input parameter of the report. It should be a list or array.

Thanks.

2 Likes