Reusable code to generate Fast export Script

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Enthusiast

Reusable code to generate Fast export Script

Hello,

 

Please let me know if there is a resuable code to generate Fast export script and Multi Load script. I have table with 100 columns , hence looking for it. Thanks in Advance.

Tags (2)
4 REPLIES
Teradata Employee

Re: Reusable code to generate Fast export Script

Hi vPrashanth99,

 

Are you talking about "legacy" tools or load options of TPT ?

 

For the first part, I don't know much, but for TPT (which you should use), you don't have to declare the whole hundred columns if your schema can be derived from a table or a query.

About reusabilty, you can work with templates and parameters files.

You can find some examples in your TPT/sample/userguide folder, or here on this forum.

Enthusiast

Re: Reusable code to generate Fast export Script

Hello Walder,

 

Im talk on Fast export script on teradata that uses to export to a file. We can reuse the existing script, however we need to manually change as table structure, below is the sample script.

 

.LOGTABLE tduser.employee_log;  
.LOGON 192.168.1.102/dbc,dbc;  
   DATABASE tduser;  
   .BEGIN EXPORT SESSIONS 2;  
      .EXPORT OUTFILE employeedata.txt  
      MODE RECORD FORMAT TEXT;      SELECT CAST(EmployeeNo AS CHAR(10)), 
         CAST(FirstName AS CHAR(15)), 
         CAST(LastName AS CHAR(15)), 
         CAST(BirthDate AS CHAR(10))   
      FROM
      Employee;
   .END EXPORT;
.LOGOFF;

 

Teradata Employee

Re: Reusable code to generate Fast export Script

Sorry I don't have much knowledge of prior tools.

My collegues may be more usefull than me here.

 

Still, you should consider to switch to TPT. It's not hard.

 

 

Teradata Employee

Re: Reusable code to generate Fast export Script

Even TPT won't automatically create a job that writes some very specific format like fixed-width TEXT. TPT or even Teradata Studio can write delimited text.

 

For TEXT, consider querying dictionary metadata (e.g. DBC.ColumnsV) to generate the SELECT statement.