TPT and Unix/Linux Environment Variables

Tools
Enthusiast

TPT and Unix/Linux Environment Variables

Is there a way, within a TPT module, to accept in OS environment variables?

I am aware of the global variable file (good for all modules) and the local variable file (good for a particular module), but I need to get variables passed in for a specific execution of a module (i.e. the parms values will change with each execution).

I would also like to have a generic script to invoke various TPT modules (so the -u option would change).

Multiload used to have an ACCEPT capability, but I'm not finding such flexibility with TPT.  Right now, we are generating TPT modules from templates, and using awk to replace the variables that we need.

Any/all help appreciated.

4 REPLIES
Teradata Employee

Re: TPT and Unix/Linux Environment Variables

Not sure why the -u command line option cannot be used for this approach. That is what it is for.

Or a different job variable file for each job.

However, the OS environment variable solution is on our list of features to add, but it will not occur until 15.0.

-- SteveF
Enthusiast

Re: TPT and Unix/Linux Environment Variables

That's good to hear about TD15.  The -u should suffice for our immediate needs, but there are unix/linux command line length limits so file paths and such could stretch those limits.

The main reason is to enable a generic and reusable template to call tpt and perform other standard batch items like logging and file maintenance.  Some tpt's will load files, some won't, some may set an environment (dev/prd), some don't need it.  So a single static command line (for this execution template) would need to have every theoretical variable we may want to use referenced in it.

Allowing environ variables within the tpt allows for generic execution and the sky becomes the limit within the specific tpt code.

Thanks for the reply !

Enthusiast

Re: TPT and Unix/Linux Environment Variables

The problem with the -u or -v methods is security.

If you are passing the user/pass with -u then it will show up in the process list.

Saving the clean user/password to a file is also not usually accepted by security guys.

Passing with env variables are fine I think.

Is it included in TD15?

Teradata Employee

Re: TPT and Unix/Linux Environment Variables

The environment variable support never made it into 15.0 or 15.10.

It is (once again) on our list of features for 16.0.

(And do not confuse "TD15" with "TPT15.0". "TD15" implies Teradata database.)

-- SteveF