All Forums Tools
ruranker 6 posts Joined 05/09
04 Nov 2009
Teradata TPT Script

I am attempting to write a TPT script to move data from one table to another. The tables are on two different Teradata systems (one is production the other is test). My source and target table are exactly the same in every way (fields, datatypes,...). I was able to get the script to work no problem.Here is my question. Since the tables are exactly the same, does the script need to have DEFINE SCHEMA listing all the fields and data types? Sure would be nice not to have to define field level details. My ultimate goal is to create a dynamic TPT script moving a variable table list and it would be sure nice not to have to go down to field level definitions.

feinholz 1234 posts Joined 05/08
04 Nov 2009

We do understand that it would be nice to not have to specify a schema object in the script, and we are working towards that goal. If you have further questions on this, do not hesitate to ask, and please send all questions to the Tools section of the Developers Exchange site.Thanks!

--SteveF

Samya 21 posts Joined 11/11
07 Dec 2011

 

Hi, 

I am new to TPT, i want to generate TPT script dynaminally, as my tables may change from time to time. i need a script which will dynamically fetch the Source and target table information from a meta data table.

Plz help me with the same.

Thanks in advance.

 

Regards,

Sam

 

Samya 21 posts Joined 11/11
08 Dec 2011

 

To be more precise in regards of my query as above, i need to move tables from system to another.

My source and destination table schema will be same.

I want a single script, which can move any table, only by changing the table details (table name, etc).

feinholz 1234 posts Joined 05/08
08 Dec 2011

You have 2 choices.

1. use Easy Loader (executable is called "tdload"); in TTU 14.0 we allow you to supply the source table name and target table name (and logon credentials for each machine) and we will generate the script and run TPT and move the data for you.

2. if you cannot use TPT 14.0 then a simple, general purpose, script can be created, whereby you pass in the table names and logon credentials through parameters (job variables).

The TPT User Guide has examples of how to do this.

 

--SteveF

Samya 21 posts Joined 11/11
08 Dec 2011

 

Thanks Feinholz.....

By TPT version is 12.0, so easy load is out of frame.

Yup, checked out job variables, its realy of my use, but before i proceed i have a few questions to get clarified :-

  1. Is TPT supported in MacOS? I am forced to ask this question, because in supported platform section there is no MacOS.
  2. What is the significance of Tdpid, username & password in the operator defination section of the script?If we are already logged in to Td before running the script, why to use these creds? 
  3.  I am working in hadoop env, my TPT script is also here. i want this script to execute here, wherein it connects to the TD server and to the extraction job.

Is this possible? If yes, what changes need to be made in the script so that it can connect to the TD server.

Note:-When i tried with the normal TPT script with no changes regarding the connection to the TD server, and run the script using tbuild -f <Script name> in the hadoop env, got the error "No Command found". I suppose this is because this command is purely teradata oriented.

I am in great need of your's help.

Thanks in advance,

Regards,

Samya

 

feinholz 1234 posts Joined 05/08
09 Dec 2011

TPT is not yet supported on Mac OS X.

That effort is planned (but not committed) for 4Q12.

TdpId/Username/UserPassword is the only mechanism by which TPT can connect to Teradata.

As a user you may be logged in to TD, but running TPT is just running an application on the server and that does not mean the application is connected to TD.

So, your TPT script must contain the TdpId, UserName and Password of the database to which you want to connect and load.

If you got a "No command found", then TPT is not installed on the box from which you invoked the command.

--SteveF

Samya 21 posts Joined 11/11
14 Dec 2011

 

Thanks Feinholz....Your reply was very helpful in the basic understanding of TPT script.

Now i have moved forward a bit, my current situation is i want to login to a given machine(which is in my network) from my local machine, then want to execute the TPT script(already present in the remote machine) from there itself. As i am using java code to connect, i have made a shell script in my local, which i call from my java code(in local), which in turn do the necessary process of connecting to the remote machine and executing the script.

The contents of my .sh is  ssh XYZ@abc.com "cd TPT;/opt/teradata/client/13.10/tbuild/bin/tbuild -f Sample_TPT_Script"

BT its giving the following error message when i am running the script:-

Error retrieving TWB root directory: Error 0 (0)

More to say, when i am doing it from the local terminal, no such error is comming.

I am in a deadlock, dont know of how to move forw......

Pz help with ur inputs ASAP.

Thanks in advance.....

 

Regards,

Sam

Samya 21 posts Joined 11/11
14 Dec 2011

I forgot to state that:-

 

/opt/teradata/client/13.10/tbuild/bin/ - is the path of the tbuild command in the remote machine, as without this path its saying "tbuild : not found"

feinholz 1234 posts Joined 05/08
14 Dec 2011

Are you sure the entire environment is set up correctly?

Did you make sure that TWB_ROOT is set up and is available in the environment from the Java app that is connecting to the remote machine?

 

--SteveF

Samya 21 posts Joined 11/11
14 Dec 2011

 

Hi feinholz,

Plz chk the value of TWB_ROOT, that is set in the env.

TWB_ROOT=/opt/teradata/client/13.10/tbuild  
if [ "${PATH}" = "" ]; then            
   PATH="${TWB_ROOT}"/bin                    
else                                         
   PATH="${TWB_ROOT}"/bin:"${PATH}"         
fi                                           
if [ "${LIBPATH}" = "" ]; then               
   LIBPATH="${TWB_ROOT}"/lib:/usr/lib        
else                                         
   LIBPATH="${TWB_ROOT}"/lib:"${LIBPATH}":/usr/lib 
fi                                          
if [ "${NLSPATH}" = "" ]; then               
   NLSPATH="${TWB_ROOT}"/msg/%N             
else                                         
   NLSPATH="${TWB_ROOT}"/msg/%N:"${NLSPATH}" 
fi                                          
export TWB_ROOT PATH LIBPATH NLSPATH         
MANPATH=/usr/share/man:/opt/teradata/client/13.10/odbc_32/help/man:$MANPATH; export MANPATH 
NLSPATH=/opt/teradata/client/13.10/odbc_32/msg/%N:$NLSPATH; export NLSPATH 

As you can see the TWB_ROOT is pointing towards /opt/teradata/client/13.10/tbuild and the PATH is pointing towards /opt/teradata/client/13.10/tbuild/bin .
 I guess the path is set correctly

Regards,

Sam

feinholz 1234 posts Joined 05/08
15 Dec 2011

Just want to make sure that when you ssh to the remote system, you indeed pick up the correct environment.

I have searched through the code and do not see that particular error message, but it still might be coming from TPT.

Still, it is possible that the "ssh" process is not picking up that environment variable.

 

--SteveF

feinholz 1234 posts Joined 05/08
15 Dec 2011

Ok, looked a little further and that error message does not look like it comes from TPT.

Also, in the environment setup you showed me earlier, from what file was that text?

 

--SteveF

Samya 21 posts Joined 11/11
27 Dec 2011

 

Hi Feinholz...

I have have new query, that doed TD provide any Java Api to invoke the TPT from java code.

 

Regards,

sam

ravindar 1 post Joined 12/11
27 Dec 2011

Hi,

I am trying to load the data from oracle table to teradata table using TPT using the below script but it generated the script below errors. I am unable to identify my mistake in the below script could any one help me in this.

 

I am using teradata 13.0 demo version

 

and my oracle version is 10g

 

SCRIPT

 

define job orcl_load
(

define operator ravi_lop

type load

schema *

attributes
(
varchar username,
varchar password,
varchar logtable,
varchar tgttable,
varchar tdpid
);

define schema ravi_lsc
(
pid char(10),
pnm char(10)
);

define operator ravi_eop

type export

schema ravi_lsc

attributes
(
varchar username,
varchar password,
varchar selstmt,
varchar dsnname
);

apply
(
'insert into ravee.party6(pid,pnm) values(:pid,:pnm);'
)

to operator
(

ravee_lop

attributes

(
username='ravee',
password='ravi',
logtable='p1_log',
tgttable='ravee.party6',
tdpid='127.0.0.1'
)
)

select * from operator
(
ravee_eop
attributes
(
username='scott',
password='tiger',
selstmt='select pid,pnm from scott.p1;'
dsnname='orcl'
)
);
);

 

OUTPUT:

 

C:\Documents and Settings\Administrator>tbuild -f c:\tpt\load_op.txt
Teradata Parallel Transporter Version 13.00.00.02
line 12: syntax error at "varchar"; "varchar" not in { LPAREN_ EQUALS_ ARRAY_ VA
RCHAR_ VARYING_ REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER_ EXTENDED_IDENTIFIER_NO_
N_ } in Rule: Attribute Definition
line 33: syntax error at "varchar"; "varchar" not in { LPAREN_ EQUALS_ ARRAY_ VA
RCHAR_ VARYING_ REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER_ EXTENDED_IDENTIFIER_NO_
N_ } in Rule: Attribute Definition
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
Job terminated with status 8.

Samya 21 posts Joined 11/11
27 Dec 2011

Hi ravindra,

 

May be this could be of yours help..

http://developer.teradata.com/tools/articles/using-teradata-pt-to-copy-from-other-databases

 

Regards,

Sam

ericsun2 44 posts Joined 06/10
17 Jan 2013

Hi feinholz,
It seems that we can't refer schema definition from job variable. I have the following generic TPT template:

USING CHARACTER SET UTF8
DEFINE JOB EXPORT_TO_INDICDATA_FILE_FORMAT
DESCRIPTION 'Export from ' || @SourceTableName || ' to the INDICDATA file: ' || @DataFileName
(
DEFINE SCHEMA DATA_FILE_SCHEMA
(
@DataFileSchema
);

  DEFINE OPERATOR EXPORT_OPERATOR
  TYPE EXPORT
  SCHEMA DATA_FILE_SCHEMA
  ATTRIBUTES
  (
  VARCHAR PrivateLogName = @SourceTableName || '.log',
  VARCHAR TdpId          = @TdpId,
  VARCHAR UserName       = @UserName,
  VARCHAR UserPassword   = @UserPassword,
  VARCHAR DateForm       = 'INTEGERDATE',
  VARCHAR SelectStmt     = 'select * from ' || @SourceTableName
  );

And I put the column definition in a *.jobvars file like below:

SourceTableName='scratch_ds.My_Data_Type_Test'
DataFilePath='/export/home/esun/data'
DataFileName='my_data_type_test.indicdata.dat'
DataFileCount=1
DataFileSchema='"pid"                           Integer,
"pcode"                         Char(30),
"pname"                         Varchar(96),
"udate"                         IntDate,
"utime"                         Time(6),
"utimestamp0"                   Timestamp(0),
"utimestamp3"                   Timestamp(3),
"utimestamp6"                   Timestamp(6),
"utimestamptz"                  Timestamp(6) With Time Zone,
"price"                         Decimal(15,2),
"weight"                        Float,
"weight_flag"                   Char(3),
"lenght"                        Float,
"serialnum"                     Decimal(18,0),
"auditnum"                      BigInt,
"username"                      Varchar(60)'

But at run time, TPT complains:

Teradata Parallel Transporter Version 13.10.00.09
TPT_INFRA: Syntax error at or near line 25 of Job Script File 'tpt_export_template.txt':
TPT_INFRA: At ""pid"                           Integer,"pcode"                         Char(30),"pname"                         Varchar(96),"udate"                         IntDate,"utime"                         Time(6),"utimestamp0"                   Timestamp(0),"utimestamp3"                   Timestamp(3),"utimestamp6"                   Timestamp(6),"utimestamptz"                  Timestamp(6) With Time Zone,"price"                         Decimal(15,2),"weight"                        Float,"weight_flag"                   Char(3),"lenght"                        Float,"serialnum"                     Decimal(18,0),"auditnum"                      BigInt,"username"                      Varchar(60)" missing RPAREN_ in Rule: Explicit Schema Element List
TPT_INFRA: Syntax error at or near line 27 of Job Script File 'tpt_export_template.txt':
TPT_INFRA: TPT03020: Rule: DEFINE SCHEMA
Compilation failed due to errors. Execution Plan was not generated.

But if I just paste the content of DataFileSchema into the TPT script directly, it works fine.
Can you please comment on this? Is this fixed in 14.x? I am going to upgrade to 14.x in 2 months.
Thanks a bunch!

feinholz 1234 posts Joined 05/08
17 Jan 2013

You are getting a syntax error because the variable substitution is substituting everything, including the single quotes. And those single quotes are causing the syntax errors.
This is not really the correct way to substitute a schema.
A better way is to place the schema definition in a text file, and then use the %INCLUDE feature. You can then put the file name in a job variable and reference that file in the job variable file.
Better yet, if the schema matches the data as it is retrieved from the SELECT * in the Export operator, just let TPT determine the schema for you. The 14.0 documentation discusses explicit and implicit schema.
You can also use:
DEFINE SCHEMA <name> 'some-table-name';
and we will go out and grab the columns for that table. In your case:
DEFINE SCHEMA <name> @SourceTableName;
where (in the job variable file):
SourceTableName = 'some-table-name'
 

--SteveF

ericsun2 44 posts Joined 06/10
21 Jan 2013
USING CHARACTER SET UTF8
DEFINE JOB EXPORT_TO_INDICDATA_FILE_FORMAT
DESCRIPTION 'Export from ' || @SourceTableName || ' to the INDICDATA file: ' || @DataFileName
(
DEFINE SCHEMA DATA_FILE_SCHEMA @SourceTableName;

  DEFINE OPERATOR EXPORT_OPERATOR
  TYPE EXPORT
  SCHEMA DATA_FILE_SCHEMA

This looks really nice, but it failed in 13.10.x

Teradata Parallel Transporter Version 13.10.00.09
TPT_INFRA: Syntax error at or near line 9 of Job Script File 'tpt_export_template.txt':
TPT_INFRA: At "scratch_ds.My_Data_Type_Test" missing LPAREN_ in Rule: Explicit Schema Element List
TPT_INFRA: Syntax error at or near line 9 of Job Script File 'tpt_export_template.txt':
TPT_INFRA: TPT03020: Rule: DEFINE SCHEMA
Compilation failed due to errors. Execution Plan was not generated.

I have to use single quote or double quote in the jobvars file, otherwise TPT will not accept the variable.

The %INCLUDE will need separate file in addition to the jobvars file. Is this syntax supported in 13.10? Isn't it easier if I can put the column definition in a job variable?
 

feinholz 1234 posts Joined 05/08
21 Jan 2013

Yes, the table name must have single-quotes in the job var file; the variable substitution will carry forward the single-quotes, which is necessary.
As for putting a schema in a job var file, I do not know of any customer that is using that. They either use the syntax I gave you, or they put it in an external file and use the %INCLUDE, or they just let TPT figure out the schema for you.
 

--SteveF

ericsun2 44 posts Joined 06/10
22 Jan 2013

Would you please share a code snippet of using %INCLUDE? I can't seem to find it in any TPT documents so far.

feinholz 1234 posts Joined 05/08
22 Jan 2013

Well, you could do this:
DEFINE JOB <name>
(
      %INCLUDE '<schema file name>';
      . . . .
);
However, the DEFINE SCHEMA syntax I gave you should work just fine.
And if your schema matches the layout of the table, and you are doing a SELECT * against that table, you can let TPT just get the schema for you with the simplified syntax. Just make use of the operator templates. You can do:
DEFINE JOB <name>
(
   APPLY
   TO OPERATOR ($FILE_WRITER)
   SELECT * FROM OPERATOR ($EXPORT);
);

--SteveF

petlee 1 post Joined 03/09
23 Jan 2013

How do I use the generated schema in TPT V14? I cannot get it to work.
The following is what I have coded inside the TPT script
DEFINE JOB LOB_EXPORT_IMPORT
DESCRIPTION 'Export LOB from a table and Load into another table'
(
DEFINE SCHEMA S_SCHEMA FROM TABLE DELIMITED 'DBC.DBQLogTBL';
DEFINE OPERATOR SQL_SELECTOR
TYPE SELECTOR
SCHEMA S_SCHEMA  
ATTRIBUTES
(
VARCHAR PrivateLogName = 'selector_log',
VARCHAR TdpId = @tdpid_src,
VARCHAR UserName = @username,
VARCHAR UserPassword = @password,
VARCHAR SelectStmt = 'select * from DBC.DBQLogTbl;',
VARCHAR LobDirectoryPath = @lobpath,
VARCHAR LobFileBaseName = @lobfilename,
VARCHAR LobFileExtension = @lobextension
);
 
Then I get the following error
TPT_INFRA: TPT04108: Line 23 of Job Script File 'transfer_from_db_to_db.tpt': Syntax Error: literal string (DBS table name) expected
It is complaining the DEFINE SCHEMA syntax...
Any help is appreciated
 

rku2013 2 posts Joined 02/13
26 Feb 2013

I am using TTU 13.10 and looking for a solution for an issue similar to the above one.I tried passing the schema using INCLUDE.But it seems the schema definition given in the external file has some format issues which I am not able to solve.
I am getting the below error
Teradata Parallel Transporter Version 13.10.00.02
TPT_INFRA: Syntax error at or near line 1 of INCLUDEd File 'schema.txt':
TPT_INFRA: At "(" missing { APPLY_ LOAD_ STEP_ } in Rule: Job Definition Body
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
Job terminated with status 8.
Below is the content of the schema file,
('"EMP_ID" VARCHAR(10)
,"EMP_NAME" VARCHAR(10)')
Please help me in resolving the issue.
 
 
 
 

-

feinholz 1234 posts Joined 05/08
27 Feb 2013

Petlee: try
DEFINE SCHEMA S_SCHEMA DELIMITED FROM TABLE 'DBC.DBQLogTBL';

--SteveF

feinholz 1234 posts Joined 05/08
27 Feb 2013

rku2013:
please post the entire script and entire schema file.
(you probably should have the entire "DEFINE SCHEMA" syntax in the external schema file)

--SteveF

rku2013 2 posts Joined 02/13
01 Mar 2013

Ya..I was able to fix the issue,with the resolution mentioned....
Thank you....

-

nancyjean 5 posts Joined 02/13
14 Mar 2013

Hi,
I have installed TTU v13.10 in my system. How can I find out if I have TPT with me?
 

ulrich 816 posts Joined 09/09
14 Mar 2013

Try run 
 

tbuild -V

 

on the command line

 

if this is not giving you an information at least the installation would be incomplete...

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

Kamma1166 4 posts Joined 07/13
31 Jul 2013

Hi I am new to TPT, i am tryibg to load the DATA from Table to Table using TPT Script,
 
when i am trying i am getting Error " Syntax Error uncodedelimiter udfcallname using between USING and INSERT key word, Could you please help out.
 
 

feinholz 1234 posts Joined 05/08
31 Jul 2013

I would think if you have an error of this nature, and you would like assistance, you would provide a little more information than what you have provided.
What version of TPT are you using?
Provide your script.
Provide all of the output that you have available.
 

--SteveF

islanderman 40 posts Joined 03/14
05 May 2014

Hey Feinholz, I finally have gotten all the packages installed on my RedHat server.  I know you said to use TPT now for high volume transfer.  I wanted to do it via a perl.  I have comma delimted files and the table is empty on the Teradata side. I am setting up my schema, however how do I incorporate the files to read into the ' DEFINE OPERATOR FILE_READER' schema.  

  DEFINE OPERATOR FILE_READER

  TYPE DATACONNECTOR PRODUCER

  SCHEMA Trans_n_Accts_Schema

  ATTRIBUTES

  (

    VARCHAR PrivateLogName = 'dataconnector_log',

    VARCHAR DirectoryPath  = @jobvar_datafiles_path,

    VARCHAR FileName       = @myfiles,   ##### how do i get the files to read here

    VARCHAR Format         = 'Delimited',

    VARCHAR OpenMode       = 'Read',

    VARCHAR TextDelimiter  = '|'

  );

 

Can I also assume that I can kickoff the TPT script using a system command in the perl script?

 

feinholz 1234 posts Joined 05/08
05 May 2014

For the FileName attribute, you either place the name of the file, or if there is more than one, you can use wildcard syntax.
Yes, from the Perl script, you just execute the "tbuild" command.

--SteveF

islanderman 40 posts Joined 03/14
05 May 2014

Thanks.  Can I also ask, what does the '@jobvar' represent.  Is it just a placeholder for me to put in my dbname, username and password.  Or is it input into the script somehow?  Not sure what these mean?  Can you tell me what that error list means as well?
 
    VARCHAR TdpId          = @jobvar_tdpid,
    VARCHAR UserName       = @jobvar_username,

    VARCHAR UserPassword   = @jobvar_password,

 

    VARCHAR ErrorList      = '3807'

 

feinholz 1234 posts Joined 05/08
05 May 2014

The "@" syntax is used when you want to specify job variables.
You can hardcode a value fot eh attribute (not recommended).
Or you use the "@" syntax, provide a job variable name (of your choosing), and then create a job variable file with the values you want to pass down to the script.
Please look at the TPT documentation for all of the info.
 

--SteveF

islanderman 40 posts Joined 03/14
05 May 2014

I've done the following:
1) Created the empty table in Teradata
2) Created the TPT script with the corresponding table schema.  However the 1st column in my table has the name '#TIMESTAMP'.  The tbuild is complaining about that.  Can I get around that?
3) Updated the '/opt/teradata/client/14.00/tbuild/twbcfg.ini' file to include a 'GlobalAttributeFile' setting.
4) Created the GlobalAttributeFile to include tdpid, username, password and tablename. 
5) I created another table with the same layout as the original, with _LOG at the end of the name.  Is this required?  I'm not sure what the layout is supposed to be for the LogTable?  
Is there an example TPT script which loads to an empty table, then moves that info to a live table.  I know I can move the data in another way, but was just curious.  Thanks again for all the help.
 

feinholz 1234 posts Joined 05/08
05 May 2014

Any database object name with special characters must be enclosed in double-quotes.
That is a DBS rule.
I am not sure what you mean by #5. The user does not worry about the restart log table. You give us a name in the LogTable attribute and we will create it and manage it.
 

--SteveF

islanderman 40 posts Joined 03/14
05 May 2014

Almost got it.  I ran the script but accidently had an extra column in the test file I was inserting.  So after fixing that, dropping and creating the table, I am getting this error on the run of the script.  I have the deletes for the ErrorTable's in the script so not sure why they still exist here.  After I manually deleted those ErrorTable's the script does run successfully.
 

=> tbuild -f LoadTable_TPT.txt

Teradata Parallel Transporter Version 14.00.00.09

Job log: /opt/app/d1car1m6/opt/cap-monitoring/logs/d1car1m6-9.out

Job id is d1car1m6-9, running on hldv0153

Found CheckPoint file: /opt/teradata/client/14.00/tbuild/checkpoint/d1car1m6LVCP

This is a restart job; it restarts at step Load_Trans_Table.

Teradata Parallel Transporter FILE_READER: TPT19006 Version 14.00.00.09

Teradata Parallel Transporter Load Operator Version 14.00.00.09

FILE_READER Instance 2 directing private log report to 'TPTLoad_Reader_log-2'.

FILE_READER Instance 1 directing private log report to 'TPTLoad_Reader_log-1'.

LOAD_OPERATOR: private log specified: TPTLoad_Load_log

FILE_READER Instance 2 restarting.

FILE_READER Instance 1 restarting.

FILE_READER: TPT19008 DataConnector Producer operator Instances: 2

FILE_READER: TPT19003 ECI operator ID: FILE_READER-12671

LOAD_OPERATOR: connecting sessions

LOAD_OPERATOR: preparing target table

LOAD_OPERATOR: TPT10508: RDBMS error 2634: Existing ERROR table(s) or Incorrect use of Rum_Load_TPT in  Fast Load operation.

LOAD_OPERATOR: disconnecting sessions

LOAD_OPERATOR: Total processor time used = '0.13 Second(s)'

LOAD_OPERATOR: Start : Mon May  5 16:54:54 2014

LOAD_OPERATOR: End   : Mon May  5 16:55:04 2014

FILE_READER: TPT19221 Total files processed: 0.

Job step Load_Trans_Table terminated (status 12)

Job d1car1m6 terminated (status 12)

 

 

So what happens if it is not successful.  Do I have to manually remove those tables?  Can I also assume that since this ran successfully, the next run will work without me having to drop and create the table, as this script will do that now?

feinholz 1234 posts Joined 05/08
05 May 2014

When you start a new job, the error tables cannot exist.
Neither can the restart log table.
On a restart, the error and restart log tables must exist.
If a job fails and it failed for a reason that could be "fixed" and restarted, you need to keep all of the tables intact so the job can be restarted.
When a job is successful, TPT will drop the error tables (if they are empty) and the log table.
(This is all outlined in the docs.)

--SteveF

islanderman 40 posts Joined 03/14
06 May 2014

The last issue I'm having is an error from an sql to the Table after the TPT script load succeeded.  I have 2 tables currently being loaded.  One is with a DBD::ODBC module, which is very slow and the 2nd using TPT.  The table layout is identical, with the same information being loaded to both.  However when I issue the following sql I'm getting a good response from the 1st table and this error on the new TPT table:

Sql => select distinct(#timestamp (date)) ,count(*) from Thirty_Day_Tables.RUM_Load group by 1;

 

2014-05-06, 6481

 

 

Sql => select distinct(#timestamp (date)) ,count(*) from One_Day_Tables.Rum_Load_TPT group by 1;

 

DBD::ODBC::st execute failed: [Teradata][ODBC Teradata Driver][Teradata Database] Invalid date supplied for Rum_Load_TPT.#TIMESTAMP.  (SQL-22008) at ./Runedwsql.pl line 94.

DBD::ODBC::st fetchrow_array warning: no select statement currently executing at ./Runedwsql.pl line 97.

 

 

Yet when I print out the #timestamp column on each table, they look the same (I only am posting 5 examples):

 

Sql => select #timestamp from Thirty_Day_Tables.RUM_Load;

 

2014-05-05 11:08:29

2014-05-05 17:46:05

2014-05-05 15:12:01

2014-05-05 13:02:25

2014-05-05 18:01:22

 

 

Sql => select #timestamp from One_Day_Tables.Rum_Load_TPT;

 

2014-05-05 17:46:05

2014-05-05 18:01:22

2014-05-05 17:25:19

2014-05-05 17:58:22

2014-05-05 18:29:36

 

 

feinholz 1234 posts Joined 05/08
06 May 2014

The errors you are getting are from the ODBC driver. Not TPT.
I cannot help with that. You will have to contact the ODBC team (or start a new thread with a better subject line so ODBC people will read it), or contact the GSC.
 

--SteveF

islanderman 40 posts Joined 03/14
06 May 2014

Hi Feinholz, I've got another question.  I'm running this from a non-root user and under crontab the tbuild run doesn't fire.  It does run fine when kicking off the script from the command line?  Is there something I need to add for PATH or LD_LIBRARY_PATH to get this to run via cron?  It installed into a standard directory on RedHat.

You must sign in to leave a comment.