We first design out ETL job in TEST and then move to PROD. Most of our jobs uses parameters, most commonly
TEST PROD
InputFileName : Employee.txt ProdEmp.txt
InputFilepath : /local/inputfiles/ /local/prodinputfiles/
OutputFileName : Emplyeeout.txt ProEmp.txt
OutputFilepath :/local/outputfiles/ /local/prodoutputfiles/
DataBaseServer : DCMDBTEST DCMDBPROD
DatabaseUserid : dcmdb dsmdb
DatabasePasswd : dbpass01 dbpass01
(** DatabaseUserid and DatabasePasswd are same for test and prod.)
The values for above parameters are different in TEST and PROD. When we move the code from TEST to PROD, we have to go to JOB PROPERTIES and redit the parameter window and enter the PROD value.
Is there any way we do this automatic. What I mean is, we will have both TEST and PROD information Parameter Values saved in the ETL and based on where we are running the appropriate (TEST or PROD) value are initialized?
Any help appreciated.
How to initialize value of parameters automatically?
Moderators: chulett, rschirm, roy
You dont need to re-edit the values of the parameters. Why dont you pass the parameter values via a parameter file.
How exactly do you plan to run your jobs.
Is the control by a sequence job or the control is by a unix script?
How exactly do you plan to run your jobs.
Is the control by a sequence job or the control is by a unix script?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
well if thats the case then i am guessing that you will have one master control sequences controlling other sequences/jobs.
When you schedule your process, pass the dsjob command along with a parameter file.
Maintain two files
test.params and prod.params
When running in the test environment, pass the command
dsjob -run `cat test.params`
and for the production environment
dsjob -run `cat prod.params'
The param file should be in the following format
-param paramname=paramvalue -param paramname=paramvalue -param paramname=paramvalue
This way you dont have to go and re-edit the param values for each environment.
When you schedule your process, pass the dsjob command along with a parameter file.
Maintain two files
test.params and prod.params
When running in the test environment, pass the command
dsjob -run `cat test.params`
and for the production environment
dsjob -run `cat prod.params'
The param file should be in the following format
-param paramname=paramvalue -param paramname=paramvalue -param paramname=paramvalue
This way you dont have to go and re-edit the param values for each environment.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
See that the directory structures are the same across the environments like Dev / Test / Prod.
If the parameters are common across all the jobs in your project ,
create Project Level Parameters using the Administrator and set $PROJDEF to those parameters as default values.
This way , if the environment changes you need change the parameters as they will take the values from project defaults which are set in administrator.
If the parameters are common across all the jobs in your project ,
create Project Level Parameters using the Administrator and set $PROJDEF to those parameters as default values.
This way , if the environment changes you need change the parameters as they will take the values from project defaults which are set in administrator.
Re: How to initialize value of parameters automatically?
Intelligent job control, stored process metadata, and configuration values in a repository. The job control fetches the appropriate configuration values, retrieves pertinent process metadata, and derives other runtime values as part of its tasks of running jobs, analyzing quality of processing, and storing process metadata.shamshad wrote:Is there any way we do this automatic. What I mean is, we will have both TEST and PROD information Parameter Values saved in the ETL and based on where we are running the appropriate (TEST or PROD) value are initialized?
Any help appreciated.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle