how to MLOAD byte data

Tools

how to MLOAD byte data

I exported some byte data from DB2 into a flatfile (such x'00' x'20' x'08' ....). I tried in fixed length and delimited formats, but I was not able to load into a Teradata byte column using MLOAD. The byte data when exported to these files is a sequence of 13 characters. I used a delimiter which would not conflict with any of the byte data characters.

For the fixed length TEXT file, I defined the field as BYTE(13) in the layout, same size as the target table. When run, I get a error such as data in the file invalid for the byte colummn.

For the vartext delimited file, I defined the field as VARBYTE(13) in the layout, and I get an error such as "data is too short". It seems like MLOAD can't break up the record correctly.

Is the problem related to the non-standard text characters in the file? Should I use the unformatted format?

Thanks
1 REPLY

Re: how to MLOAD byte data

Hi,

I am not pretty sure if I cant see the code.
Can you please share only the sample code if I can have a look and what is the error thrown.

Did you try with .IMPORT INFILE "yourinput file" FORMAT BINARY LAYOUT "your layout" APPLY "your dml";

Let me know if it works.

Thanks,
Raja