All Forums Tools
KN 9 posts Joined 05/16
19 Jul 2016
TPT - Scripting

Hello Folks
I have a requirement to move 90 tables totalling up to 200 GB from one Teradata system to an another Teradata system.. While i know there are different options i plan to use TPT to move them..All the column data has to be moved..
TPT requires to define schema layout .. Is there a way to do without the schema layout? I dont want to do it manually .. Has any one developed a reusable script for moving data where the scipts reads 1 table moves the data then moves to 2 nd table and so on?

CarlosAL 512 posts Joined 04/08
19 Jul 2016

You can use Templates and Generated Schemas.

M.Saeed Khurram 544 posts Joined 09/12
19 Jul 2016

You can use template and wrtie a macro or SP to take input the table name or loop through list of tables and generate TPT script against each table.


awenny 4 posts Joined 09/10
19 Jul 2016

You can use this perl program:

But I haven't used it for a long time. Maybe it requires some tweaks.

You can also remove the "VarSubst" if you don't have it and change the logon information.

feinholz 1234 posts Joined 05/08
19 Jul 2016

What version of TPT are you using?
That would dictate what type of "template" and "generated schema" features you can use.
It would also dictate whether you can use Easy Loader (tdload) to move the tables.
tdload is a scriptless, command line driven, way to execute TPT jobs.
You may be able to write a very simple, general purpose TPT script where all you do is pass in the table name (and logon credentials). TPT would determine the schema from the source table and create the necessary steps to run the Export operator and Load operator to copy the tables from one system to another.
And if you are able to use "tdload" then you would just invoke that TPT front-end, providing the source table name, target table name and the logon credentials and tdload would generate the TPT script and copy the data.
HOWEVER, for TPT the target table must exist in order to use this simplified method.
If you need TPT to create the target table, then you will need to write a script (a simple one, but you would still need a script).


KN 9 posts Joined 05/16
19 Jul 2016

Thank you all for the pointers...
We are on DBS version is on 14.10 currently.. I have set up a Teradata Sandpit environment on VM infrastructure and that is on TD 15.0..Basically We wanted to offload a specific subject area data to test a predective modelling tool ( IBM ).  The TPT version is 14.10..
@FeinHolz :  Because we know that LOAD will silently discard duplicates and some of our tables are defined with NUPI is there a felxibility to opt for an UPDATE operator..
Appreciate your comments!

feinholz 1234 posts Joined 05/08
21 Jul 2016

There is currently no way to force tdload to use a specific operator.
(It is on the list for a future enhancement.)
To force the use of a specific operator, you would need to write a script.
(Although the script can be very simple and general purpose, such that the parameters you would use in the tdload job variable file would still be valid for the script.)


KN 9 posts Joined 05/16
22 Jul 2016

Thank you Steve.. I did give a try to make use of TDLOAD and it worked wonderfully well.. I was able tto see that the TDLOAD picked up update operator when the i had the target table with SI.. and without an SI it picked up load opeartor..
I will have to set up a Unix script so that i can pass Databasename and Tablename to the tdload command so it meet my criteria...

You must sign in to leave a comment.