What version of TPT are you using?
We have made great improvements to the simplification of our script language, such that you do not need to be so verbose.
Also, we can obtain the schema automatically now.
We are trying to get TPT users to move to the use of templates. When you install TPT, we will install template files in the install directories. Those templates are text files that contain the operator definitions, with job variables assigned for every supported attribute.
If you want, you can also obtain the schema of a table by using this syntax:
DEFINE SCHEMA FROM TABLE <table name>;
In fact, we have made enhancements to Easy Loader to support the Export operator so that you can do what you are trying to do just from a command line, wiithout the need for a script.
To answer your question, though, pretty much everything in a TPT script can be replaced by either a job variable, or the use of the %INCLUDE statement to bring in text from an outside source.
However, with TPT's "simplicity", you can do this:
DEFINE JOB . . .
(
APPLY $INSERT
TO OPERATOR ($LOAD[1])
SELECT * FROM OPERATOR ($EXPORT[1]);
);
The $LOAD syntax says to use the Load operator.
The $EXPORT syntax says to use the Export operator.
The $INSERT syntax tells TPT to generate the INSERT statement based on the schema of the source table.
TPT will generate the needed syntax for the script under the covers.
You then just need to supply a job variable file on the command line with the needed metadata items (logon information, table name, etc.).
With Easy Loader, we support the Export operator in versions 14.00 and 14.10.
From the command line, you just provide the source table and logon credentials, and the target table and logon credentials, and Easy Loader will generate the script for you, based on the schema of the source table.
The attached Partners presentation may help.
↧