BTEQ Import/Export character set problem

Tools
N/A

BTEQ Import/Export character set problem

Hi all,

I still have a problem using BTEQ import and export. I am using INDICDATA to export and import null values. During my tests I got the error "Failure 6706 The string contains an untranslatable character.".

Therefore I added

.set session charset 'UTF8'

to my export script. So I was able to import the data where I seem to have some unicode characters in. But now I am no longer able to import for example CHAR(1) columns, because Teradata seems to somehow extend these fields (to 3 bytes?!). For these columns I now get the error "Failure 2673 The source parcel length does not match data that was defined.". 

If you look at the data file you can see the difference:

)^@^@^@^@^@^@U^E^@admin^Z^@test text

+^@^@^@^@^@^@U ^E^@admin^Z^@test text

Any idea how to avoid this "extension" for CHAR columns during export and at the same time being able to export unicode characters?

1 REPLY
Teradata Employee

Re: BTEQ Import/Export character set problem

Your export and import need to use the same client character set. The database deals with lengths in terms of characters and the client-side definitions with bytes, and worst case a character recognized by Teradata would occupy 3 bytes in UTF8. So adjust accordingly.