TPT script to move data from table to file

Tools & Utilities
Enthusiast

TPT script to move data from table to file

Hi All,

I have to write a TPT script to move data from teradata table to flat file in unix. I know we should use a export operator as producer and a dataconnector as consumer but i have somethings to clarify whether the following is possible in writing TPT in unix.

1. Can i compress the file before i load into the target unix directory?

2. Is there any file size restriction in UNIX on transfer of data?

3. Is there any operator or function avaialble to compress the file?

We are using TPT version 13.1 and i am writing it in UNIX environment.

And one more question is there any operator to incorporate unix commands in TPT script?

Any information will be highly helpfula nd will appreciated.

Thanks in advance.

Tags (1)
9 REPLIES
Teradata Employee

Re: TPT script to move data from table to file

1. No, not supported yet.

2. No.

3. No, not available yet.

4. Yes, it is called the OS Command Operator.

Please refer to the TPT documentation for #4.

-- SteveF
Enthusiast

Re: TPT script to move data from table to file

Hi Feinholz,

I have to write a TPT script in UNIX which will export data from teradata and write into file using dataconnector operator.

Can i export data from a view in teradata?

Also what is a named pipe and how can it be used?

Also, can i execute a TPT by calling it from an external shell script in UNIX?

Thanks

Teradata Employee

Re: TPT script to move data from table to file

Yes, you can export data from a view (it might depend on which operator you use for that, you will have to check the documentation).

Yes, you can execute TPT by calling it from a shell script.

You do not need to use named pipes with TPT in order to export data from Teradata and write to a file.

-- SteveF
Enthusiast

Re: TPT script to move data from table to file

Hi,

I wrote a simple TPT script to export teradata view to a file.

And when i try execute it using tbuild -f scriptname.txt , i get the following error.

$ tbuild -f test_view_file_TPT.txt

Teradata Parallel Transporter Version 13.10.00.02

Job log: /opt/teradata/client/13.10/tbuild/logs/a9095008-8586.out

Job id is a9095008-8586, running on pepxap00363

Found CheckPoint file: /opt/teradata/client/13.10/tbuild/checkpoint/a9095008LVCP

TPT_INFRA: TPT02743: Error: Cannot get the current job step from the Checkpoint file.

  The job is terminated.

Any idea on this error?

Thanks

Re: TPT script to move data from table to file

Hi,

Is it possible to write a TPT script which will export records over a time period, for eg., monthly,weekly , daily basis from Teradata table.

The Teradata table does not contain any date field(column) on which we can do filter.

Please help me.

Teradata Employee

Re: TPT script to move data from table to file

It's not possible because a date column is required to filter the rows.

Enthusiast

Re: TPT script to move data from table to file

Hi Experts

on executing a TPT script to bring data from oracle to teradata table am encountering the following error:

kasidy:/ngs/app/slsaudedwd >tbuild -f emp_tpt_ora.sql

Teradata Parallel Transporter Version 13.10.00.12

Job log: /ngs/app/tbuild/teradata/client/13.10/tbuild/logs/slsaudd-10437.out

Job id is slsaudd-10437, running on kasidy

Found CheckPoint file: /ngs/app/tbuild/teradata/client/13.10/tbuild/checkpoint/slsauddLVCP

TPT_INFRA: TPT02743: Error: Cannot get the current job step from the Checkpoint file.

  The job is terminated.

Please suggest the ways to resolve it...

Enthusiast

Re: TPT script to move data from table to file

Hi Atul,

delete the checkpoint file, and rerun the job, it will be working fine. 

Khurram
Enthusiast

Re: TPT script to move data from table to file

Hi Experts

Can u please post a TPT script to load a teradata table in target environment from two or more source table from source environment.