teradata fastload error

Database
Teradata Employee

teradata fastload error

Hi 

My teradata version is : 14.00.00.09.

In define part of tertadata Fast Load script , If I use  <cloumn name> date , teradata gives me an error which says  :

               Invalid column type for column: JOINING_DATE

              Only VARBYTE, VARCHAR or LONG VARCHAR column types

              supported for Variable-Length Text record type

how will I use different datatype then , below is my fastload script
SESSIONS 5;
TENACITY 5;
SLEEP 5;
ERRLIMIT 5000;

.logon tdpid/user,pass

DROP TABLE EMPLOYEE_JOINING;
DROP TABLE EMPLOYEE_JOINING_ET;
DROP TABLE EMPLOYEE_JOINING_UV;

CREATE SET TABLE EMPLOYEE_JOINING
(
NAME VARCHAR(255) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
EMPLOYEE_ID VARCHAR(8) UPPERCASE CHARACTER SET LATIN NOT NULL,
JOINING_DATE DATE FORMAT 'YYYYMMDD' NOT NULL DEFAULT DATE
);

SET RECORD VARTEXT ',';
RECORD 2;

DEFINE
NAME (VARCHAR(225)),
EMPLOYEE_ID (VARCHAR(8)),
JOINING_DATE (DATE)

FILE=user/path/employee.txt;
show;

BEGIN LOADING EMPLOYEE_JOINING ERRORFILES SANDBOX.EMPLOYEE_JOINING_ET ,SANDBOX.EMPLOYEE_JOINING_UV;
INSERT INTO EMPLOYEE_JOINING
VALUES
(
:NAME,
:EMPLOYEE_ID,
:JOINING_DATE
);

END LOADING;
.LOGOFF;

Thanks in advance 

Punit

Tags (1)
2 REPLIES
Enthusiast

Re: teradata fastload error

Use the following code. I am not an expert but this worked for me. Try to change the format of date in SQL Assistant.

 

SESSIONS 5;

TENACITY 5;

SLEEP 5;

ERRLIMIT 5000;

  

.logon tdpid/user,pass

  

DROP TABLE EMPLOYEE_JOINING;

DROP TABLE EMPLOYEE_JOINING_ET;

DROP TABLE EMPLOYEE_JOINING_UV;

  

  

CREATE SET TABLE EMPLOYEE_JOINING

(

NAME            VARCHAR(255)            CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,

EMPLOYEE_ID     VARCHAR(8)      UPPERCASE CHARACTER SET LATIN NOT NULL,

JOINING_DATE    VARCHAR(15) ;  

SET RECORD VARTEXT ',';

RECORD 2;

  

DEFINE

NAME (VARCHAR(225)),

EMPLOYEE_ID (VARCHAR(8)),

JOINING_DATE (VARCHAR(15))

  

FILE=user/path/employee.txt;

show;

  

BEGIN LOADING EMPLOYEE_JOINING ERRORFILES SANDBOX.EMPLOYEE_JOINING_ET ,SANDBOX.EMPLOYEE_JOINING_UV;

INSERT INTO EMPLOYEE_JOINING

VALUES

(

:NAME,

:EMPLOYEE_ID,

:JOINING_DATE

);

  

END LOADING;

.LOGOFF;


Re: teradata fastload error

Thanks for the information, I was looking for it. New in forums so bear my words please.