How to use bteq to import data contains Chinese characters into Teradata table on a Red Hat Enterprise Linux Server?

General

How to use bteq to import data contains Chinese characters into Teradata table on a Red Hat Enterprise Linux Server?

Hi guys,

I got a pulzzed issue on using bteq to import data from data files into a Teradata table. My data file has Chinese characters, I run these process on Linux shell environment. 

Below is my bteq script: Posting text removed based on formal request from Owner of the associated Intelectual Property

Below is my data file content, which contains only one line: Posting text removed based on formal request from Owner of the associated Intelectual Property/Customer Data

Below is my execution output: Posting text removed based on formal request from Owner of the associated Intelectual Property

The record successfully insert into my Teradata table, but the field which contains Chinese characters only contains none-Chinese characters.

The field value 'CUSTOMER DATA REMOVED - CHINEESE CHARACTERS' in data file becomes 'CUSTOMER DATA REMOVED - INTERNATIONAL CO., LIMITED ' in Teradata table, what cause this?  And how to fix this?  Please help me. 

Thanks a lot.

2 REPLIES
Teradata Employee

Re: How to use bteq to import data contains Chinese characters into Teradata table on a Red Hat Enterprise Linux Server?

Note: Posting text has been obfuscated due to a formal request by the owner of the Intelectual Property.

On your Create Table, is the server character set UNICODE for the COULMN_NAME_OBFUSCATED Using field?

Re: How to use bteq to import data contains Chinese characters into Teradata table on a Red Hat Enterprise Linux Server?

Note: Posting text has been removed or severly obfuscated based on formal request from Owner of the associated Intelectual Property

Thanks david,

Yes, COLUMN_NAME_OBFUSCATED field is UNICODE, the following is my table's DDL:

CREATE SET TABLE TABLE_NAME_OBFUSCATED ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      COLUMN_NAME_OBFUSCATED Name VARCHAR(200) CHARACTER SET UNICODE NOT CASESPECIFIC,

    )

PRIMARY INDEX ( INTELECTUAL_PROPERTY_REMOVED );

I have also try to set BTEQ session charset and input/output charset to both UTF8, but this issue is still the same.