-1

I have to upload a Unicode text file(want to show Japanese characters etc.) Into a netezza table. I have created a table with nvarchar columns and I have given the below code but it doesn't work.

cat *filename.csv|nzconvert -f utf8 -t nfc|tr -d '\r' |nzload ......

any other options?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
laxman
  • 1
  • Generally speaking "... but it doesn't work." isn't sufficient. You should provide the specific error or behavior that you're experiencing. In the context of using nzload, one should generally provided the full command used to invoke it, and consider providing the nzlog output as well. With that we can better assist you. – ScottMcG Oct 09 '15 at 20:16
  • Absolutely agree with @ScottMcG, but if I had to hazard a guess, it's because you didn't use the `ctrlChars` external table option. – Jeremy Fortune Oct 10 '15 at 12:07

1 Answers1

0

Here is an example of using nzload to load Unicode data into Netezza

[nz@netezza ~]$ cat test.txt
アイウエオカキクケコサシスセソタチツテ

[nz@netezza ~]$ nzsql -d testdb -c "create table nvarchar_test (col1 nvarchar(500))";
CREATE TABLE

[nz@netezza ~]$ nzload -db testdb -t nvarchar_test -df test.txt -ctrlchars 
Load session of table 'NVARCHAR_TEST' completed successfully

[nz@netezza ~]$ nzsql -d testdb -c "select * from nvarchar_test"
        COL1
---------------------
 アイウエオカキクケコサシスセソタチツテ
(1 row)
ScottMcG
  • 3,867
  • 2
  • 12
  • 21