Load FASTLOAD Error Records into Required Format

Database

Load FASTLOAD Error Records into Required Format

I need to store the value in the DataParcel column(which is of VARBYTE datatype) in the first error table of FASTLOAD into a permanent teradata table but with a proper format(The ddl of this table will be exactly the same as the target table, except that all datatypes are varchar)

I know this as a potential solution/*From teradata manual*/:

1. Export the dataparcel columns using BTEQ in RECORDMODE

2. Import it back again using BTEQ IMPORT-->USING-->INSERT statements. Here I need to ensure I strip out the first 2 bytes by using a dummy SMALLINT field in the USING modifier.

Is there any other solution where I achieve all of the above by keeping the record in teradata itself rather than export the records back to the client system and bring it back into Teradata?

Perhaps a UDF that converts the dataparcel column which is in varbyte to varchar?

Regards,

Suhail

1 REPLY

Re: Load FASTLOAD Error Records into Required Format

Hi Suhail ,

I am following your different blogs for the same answer that you are requiring for .

What I feel from this post of you is ,the 1st method (export and import) ,described as a potential solution is working good for you. If so could you please share the entire script(bteq,table ddl etc) with me as I am failing to do the same .

I followed the same :

1. 1st I exported the dataparcel column to a .out file using bteq.

2. Now I am trying to import from this .out file to a teradata table and is getting the below error :

Import data size does not agree with byte length.

            The cause may be:

                1) IMPORT DATA vs. IMPORT REPORT

                2) incorrect incoming data

                3) import file has reached end-of-file.

 *** Warning: Out of data.

 error: