We are currently running some batch jobs in 4.0 that need to have changes in the substitution parameters from run to run (some of the transforms only accept a substitution parameter, no variables). I was thinking of automatically generating the batch file with the set of substitution parameters about to be run but I am fairly sure that isn’t the best way to go about things. Are there any more friendly options at my disposal?
One is as you’ve described. Export the execution command and wrap a script around it to populate your variables.
The other is to use web services. Using the real time function run_batch_job, from a real time datastore or other means to send the soap request. (the suds module in Python is easy)
If you’re going to load it into an enterprise scheduler, Im going to have to say that using the export execution command is going to be simpler. I have a set of jobs that have been running for 5~ years now and I cant remember the last time I had problems with one.
I’m still new to the use of substitution parameters so I could be wrong, but here goes…
The substitution parameter values are not in the export execution command file. They are in the repository. At runtime the job server reads in the source code for the job and anywhere it finds the substitution parameter it substitutes in the value for it that was found in the repository. There is a term for this in C++ but it escapes me at the moment. Something about compile time, blah, blah, blah.
If you want to run an ETL job with different substitution parameter values for each call of the job then:
Perhaps you are using substitution parameter values wrong. Maybe you should be using global variables instead.
Change the substitution parameter value in the repository just before you run the ETL job and the job will pick up the current value.
Not quite the same thing because once a program has been compiled anything that is part of the preprocessor directives is hard-wired into the code and cannot be changed when the program is run. DS Substitution parameters are associated with the system configuration used to run the job. So the OP has the following choices:
set up multiple system configs for each value of substitution parameter required. I think the system config. can then be passed as part of the command line when the job is run (I don’t run jobs outside the designer/management console interfaces)?
find some way to modify the substitution parameters prior to running the job - the only possibility would seem to be an ATL file imported immediately before running the job?
I would also to be interested to know what transform only allows substitution parameters - I note some of the DQ/Cleansing transforms use them a lot.
As for this particular transform, this is an Address Cleanse transform which is (I guess) not an out of the box transform. Basically you feed it names and addresses and it standardizes them, flags movers, etc etc. Anyway, many of the parameters only accept a Substitution Parameter.
If you havent built your NCOA automation yet, beware that the USPS has just recently began checking the logs you’re required to provide them. More specifically theyre being real picky about the list dates. So if you populate your list return date with the current date, then it rolls over midnight as its processing … that will generate a correction email from the post office when you submit your logs.