Migrating Data from netezza to Teradata using TPT ODBC operator

Database
Visitor

Migrating Data from netezza to Teradata using TPT ODBC operator

Hi,

 

I have written a sample TPT script to load data from NZ to TD, the issue is data gets loaded into ET with garbage values. So need to know how to specify the delimiter in the odbc operator as well as load operator

 

Define job Load_Source_Via_ODBC
Description 'Loads the Employee table to Teradata from Netezza.'

(

Define Schema Target_Table

Description 'TPT Load Operator'

( Employee_No INTEGER,

Dept_No SMALLINT,

Last_name CHAR(20),

First_name VARCHAR(12),

Salary DECIMAL(8,2)

);

DEFINE OPERATOR ODBC_Operator

DESCRIPTION 'This ODBC operator will load rows from a Netezza database into Teradata.'

TYPE ODBC

SCHEMA Target_Table

ATTRIBUTES

(VARCHAR DSNName = 'NZSQL',

VARCHAR UserName = 'admin',

VARCHAR UserPassword = 'password',

VARCHAR SelectStmt = 'SELECT * FROM SQL_CLASS.admin.EMPLOYEE_TABLE;');

Define Operator Load_Operator
Description 'TPT Load Operator'

Type Load

Schema Target_Table

Attributes

(Varchar TdpId = 'TD',

Varchar UserName = 'dbc',

Varchar UserPassword = 'abc123',

Varchar WorkingDatabase = 'SQL_Class',

Varchar LogTable = 'SQL_CLASS.ODBCLog',

Varchar TargetTable = 'Employee_Table2'

);

APPLY

( 'INSERT INTO SQL_CLASS.Employee_Table2(:Employee_No, :Dept_No, :Last_name, :First_name,:Salary);')

TO OPERATOR ( Load_Operator [1] )

SELECT * FROM OPERATOR ( ODBC_Operator [1]);
);

2 REPLIES
Senior Apprentice

Re: Migrating Data from netezza to Teradata using TPT ODBC operator

Hi,

 

I'm not sure there should be a need for a delimiter, you're not supplying TD with a CSV-style record which has to broken into individual columns.

 

I think this is likely to be mis-matching data types between your source and target tables.

 

What is the definition of your source table?

 

Cheers,

Dave

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Teradata Employee

Re: Migrating Data from netezza to Teradata using TPT ODBC operator

A schema describes the structure of input data for a consumer operator and/or output data for a producer operator "as it is". TPT does not modify data to fit the schema.

 

And a schema is never used to describe a target table.