niroj kumar pattnaik
Answered On : 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
Login to rate this answer.
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:
.....
parameter_id=$parameter_id
filename=$filename
....
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.
e.g
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
Login to rate this answer.
Siva
Answered On : 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.
example/syntax:
air sandbox pset graph1.pset -protoype $PROJECT_DIR/mp/mygraph.mp
air sandbox parameter -path
Login to rate this answer.
Satish
Answered On : 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.
Login to rate this answer.