Creating Dynamic .pset

Hi Guys,
I have a requirement :
We need to design a graph for transition of some files. The details like filename, parameter_id (unique) we need to get from a table in DB and these should be included in the graph pset one at a time. That means for every unique parameter_id graph should run once.
Like we can have the parameter_id as the Job_name for the graph.
But how we will create such psets dynamically and run the graphs.
Help me out with ur inputs.
Kindly help in this regard. Thank You for your time.

Showing Answers 1 - 4 of 4 Answers

niroj kumar pattnaik

  • Sep 21st, 2011

May be I am not getting your query properly...but seem that you wanna override the parameters at run time or dynamically change the input param values@ run time...

> To override the param @ run time: Use Override param mechanism in a plan. (i.e. calling "dtm plan override..." from the run task method in v2.14 or "plan-admin set..." in v3.0)

> Another simpler way is to, use a wrapper script which read the values and pass it as input params for the graph

  Was this answer useful?  Yes

what i understood from ur ques is:
You have a pset having parameters- filename, parameter_id (unique), & you need to populate these parameters with the values present in a table. assuming ur table have fields "Filename & parameter Id".

Steps how to do:-
1) Create generic PSET pointing to ur graph say by assigning value from formal parameters it wil see like:
2) create a graph to read that table and load its data (contents) in a file. say FileA.dat

3) create a wrapper script to read the file FileA.dat contents one by one (in LOOP), assigning file records to respective parameters $parameter_Id and $filename & execute this PSETA.pset in same wrapper having input parameter as $parameter_Id and $filename in that loop.
Loop start ( till end of file)
Read file fileA.dat line by line and assign values to parameters $parameter_Id and $filename
Run pset by these parameter values
} loop end

4) execute the above wrapper.

Hope it will help. correct me if i m wrong

  Was this answer useful?  Yes


  • Jul 11th, 2012

you can use the air commands to create PSET for graph and add parameters to PSET. These commands can be executed in the wrapper scripts inside the while loop.


air sandbox pset graph1.pset -protoype $PROJECT_DIR/mp/

air sandbox parameter -path

  Was this answer useful?  Yes


  • Oct 8th, 2012

I am really not sure why you will have to create a dynamic PSet. That parameter file is for the static values but not the dynamic values. If you have some value witch is stored in the system and if you want to use it in your graph, just read the value from source and use it with in the graph only. I would say changing the parameter file for a dynamic data is a bad design, though it is arguable.

let me know why you have to change the pset file instead of getting the value with in the graph. thank you.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions