Need help on TPT schema writing.

Tools

Need help on TPT schema writing.

HI All,

 

We are Converting all Mload scripts to TPT . We face a scenario in schema where We need to read characters from specified position.

,T805_DATE_ENTRY        400               CHAR(008)

,T805_HOUR_ENTRY                             CHAR(004)

,T805_TIME_ENTRY        408                 CHAR(008)

,T805_DATE_APPR         515                   CHAR(008)

,T805_HOUR_APPR                                 CHAR(004)

,T805_TIME_APPR         523                      CHAR(008)

How can we achieve this ? We are using TPT 15.10 version When i used the above script getting below error.

 

TPT_INFRA: Syntax error at or near line 145 of Job Script File 'dd:SYSIN':

TPT_INFRA: At "400" missing { PERIOD_ ANSIDATE_ BIGINT_ BLOB_ BYTE_ BYTEINT_ CHA

DEC_ DECIMAL_ FLOAT_ GRAPHIC_ INT_ INTDATE_ INTEGER_ INTERVAL_ JSON_ LONG_ NUMBE

VARBYTE_ VARCHAR_

VARDATE_ VARGRAPHIC_ XML_ } in Rule: Column Data Type

TPT_INFRA: Syntax error at or near line 145 of Job Script File 'dd:SYSIN':

 

Can you please suggest the approach..

2 REPLIES
Teradata Employee

Re: Need help on TPT schema writing.

TPT does not support absolute column positioning in the SCHEMA definition. If all you want to do is skip over / ignore say 100 bytes, you can define a dummy BYTE(100) column in the schema.

Teradata Employee

Re: Need help on TPT schema writing.

If I understand you're example correctly, you are trying to split one input field into two output fields. Correct?

 

I would suggest to read the field only once and split it in the loading section.
For example for column T805_HOUR_ENTRY use SUBSTRING(:T805_TIME_ENTRY from 1 for 4)