Teradata TPT Script

Tools & Utilities
Enthusiast

Re: Teradata TPT Script

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

Teradata Employee

Re: Teradata TPT Script

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
Not applicable

Re: Teradata TPT Script

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

Re: Teradata TPT Script

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.

Teradata Employee

Re: Teradata TPT Script

Petlee: try

DEFINE SCHEMA S_SCHEMA DELIMITED FROM TABLE 'DBC.DBQLogTBL';

-- SteveF
Teradata Employee

Re: Teradata TPT Script

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

Re: Teradata TPT Script

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

Thank you....

Highlighted
Enthusiast

Re: Teradata TPT Script

Hi,

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

Senior Supporter

Re: Teradata TPT Script

Try run 

tbuild -V

on the command line

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

Enthusiast

Re: Teradata TPT Script

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.