Examples of nzconvert

You can use the nzconvert command with pipes to convert existing data in legacy code to UTF-8. The following examples show sample commands for nzconvert running on a UNIX system. The command can be used on UNIX and Windows Netezza clients.

  • To convert and load a data file in sjis, enter:
    >cat datafile | nzconvert -f sjis | nzload -t table -encoding 
    internal
  • To convert and load data from external tables, enter:
    >mkfifo namedpipe
    >cat data file | convert -f sjis > namedpipe&
    >nzload -df namedpipe -t jploadtest -encoding internal
  • To list the full set of code set aliases that are supported by nzconvert, enter:
    >nzconvert -l | grep -v 'Available converters' | awk '{print
    "nzconvert -a "  $0}' | bash

    All hyphens, underscores, and case differences are ignored in alias names.