Could you please provide a sample TPT script for exporting data from multiple tables to multiple files.
eg. to export from below 2 tables to below mentione 2 files.
Did you checked the examples for a single table export?
DEFINE JOB EXPORT_DELIMITED_FILE DESCRIPTION 'Export rows from a Teradata table to a delimited file' ( DEFINE SCHEMA PTS00016_SCHEMA ( Associate_Id INTEGER, Associate_Name CHAR(25), Salary FLOAT, DOJ INT, Designation VARCHAR(25), Loan_Amount DECIMAL(5,2), Martial_Status CHAR(1), No_Of_Dependents BYTEINT ); APPLY TO OPERATOR ($FILE_WRITER()[@WriterInstances] ATTR (FileName = 'accounts4.txt') ) SELECT * FROM OPERATOR ($EXPORT(PTS00016_SCHEMA)[@SelectorInstances] ATTR ( SelectStmt = 'select * from PTS00016_SRC;' ) ); );
I would replicate the schema and the apply section for a second export.
If this doesn't work share your code...
...and if you're working in a Windows environment the equivalent sample code file is typically at:
"C:\Program Files (x86)\Teradata\Client\YOURVERSION\Teradata Parallel Transporter\sample\userguide\PTS00016"
"C:\Program Files\Teradata\Client\YOURVERSION\Teradata Parallel Transporter\sample\userguide\PTS00016"
Thanks ulrich & dave for the sample code and details.
I have to write TPT job in mainframe and send file to a windows location so using TPT can we also mention the path where we have to send the file.
I'm not sure you can do this directly from TPT on a mainframe.
(Ignoring TPT for now) How do you get files from your mainframe to a Windows environment? Possibly your best bet is to use that mechanism.
In which case, your TPT job simply writes a mainframe file.
Then use 'the mechanism' as a separate job step to transfer the file to Windows.