Pass Parameters to the XML Graph in Clover ETL

How to pass parameters to Graph in Clover ETL.

Basically I have a query embedded in graph and I want a variable which will be taken from the code and passed the the QUERY in XML.

For example I have information coming from several tables with certain patter like YYYY_MM. So currently in my query I give values as LIKE ‘YYYY_MM’. This query resides inside XML graph file and I use JAVA REFORMAT to read the file and get the information from the Database. I want this YYYY_MM in my graph file to be parsed dynamically using a variable or using code. Basically it should come from system date and year.

Thanks,
Naveen

Hello Naveen,

I’m not really sure in which component you want to insert your parameter. Are you using the Clover Designer or are you creating the graph files otherwise?

Either way, there’s a way that you can set the parameter during run through Java. But since parameters are resolved on initialization of components, you have to call your desired graph by RunGraph component. There are two sample graphs showing it in this thread:
viewtopic.php?f=4&t=5444

I use everything through java. I do not use the ctl for that. So I have a graph file which has my SQL Query Embedded (GRF) → REF → TEXT FILE.

But the query I have written I want that to be dynamic so it can pick the year and time from the system when its is running instead of manually appending it.

I have attached my graph file in this example.

If u see in that I am passing a year in my query and I want that to be passed a parameter/variable.

Any updates on this?

Thanks,
Naveen

Hello,

can you provide us with the example file, where you’re trying to do this? We’ll take a look at it and then we can understand exactly on where do you want to get it from and into what component to insert it. There’s several ways to do this, but it depends on the case.