How to Optimize Compression in TPT script

Tools & Utilities
Highlighted
Enthusiast

How to Optimize Compression in TPT script

Hello All,

I have one TPT script where I am reading data from teradata table and writing it into Zipped file. 

I want to understand, can I give comression attribute (means that compression is fastest or Optimal) of my choice, if yes then how?

 

Below is My TPT script for refrence.

Thanks in advance!!

 

DEFINE JOB EXPORT_EMPLOYEE_DATA
DESCRIPTION 'Exports employee data to a formatted file using EXPORT'
(
DEFINE OPERATOR Consumer_File_Detail
DESCRIPTION 'Defining a consumer operator for storing retrieved data to a file'
TYPE DATACONNECTOR CONSUMER
SCHEMA *
ATTRIBUTES
(
VARCHAR DirectoryPath='/home/bigframe/Sangam/TPT',
VARCHAR FileName='emp_delimited.gz',
VARCHAR FORMAT= 'DELIMITED',
VARCHAR OpenMode='Write',
VARCHAR TextDelimiter=','
);

DEFINE SCHEMA Define_Employee_Schema
DESCRIPTION 'Defining a Schema to describe the structure of the output file'
(
order_item_id INTEGER ,
order_item_order_id INTEGER ,
order_item_product_id INTEGER ,
order_item_quantity SMALLINT ,
order_item_subtotal FLOAT ,
order_item_product_price FLOAT
);

DEFINE OPERATOR Producer_Query_Detail
TYPE EXPORT
SCHEMA Define_Employee_Schema
ATTRIBUTES
(
VARCHAR UserName='dbc',
VARCHAR UserPAssword='dbc',
VARCHAR SelectStmt = 'SELECT * FROM RETAIL_DB.ORDER_ITEMS;',
VARCHAR Tdpid='10.154.193.1',
INTEGER MaxSessions=6,
INTEGER minsessions=2,
INTEGER TenacityHours=2,
INTEGER TenacitySleep=10
);

APPLY
TO OPERATOR( Consumer_File_Detail )
SELECT * FROM OPERATOR( Producer_Query_Detail[2] );
);

Tags (1)
3 REPLIES 3
Enthusiast

Re: How to Optimize Compression in TPT script

Additional Question is that, Ehy I am not able to add XZ comression in my TPT script, ideally this should work alternative to gz compression function.

Teradata Employee

Re: How to Optimize Compression in TPT script

Currently the Data Connector operator supports only GZIP and ZIP formats (based on file extension .gz or .zip), and when writing it will use default compression .

Enthusiast

Re: How to Optimize Compression in TPT script

Thanks Fred