SQOOP-962: Document null string behavior (Venkat Ranganathan via Jarek Jarcec Cecho)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/7048ca30 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/7048ca30 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/7048ca30 Branch: refs/heads/trunk Commit: 7048ca30236b8f6a24c147d27a168c0ef2d150cb Parents: a0a03d7 Author: Jarek Jarcec Cecho <[email protected]> Authored: Thu Mar 21 20:50:26 2013 -0700 Committer: Jarek Jarcec Cecho <[email protected]> Committed: Thu Mar 21 20:50:26 2013 -0700 ---------------------------------------------------------------------- src/docs/user/connectors.txt | 56 +++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/7048ca30/src/docs/user/connectors.txt ---------------------------------------------------------------------- diff --git a/src/docs/user/connectors.txt b/src/docs/user/connectors.txt index c172c4b..cf66112 100644 --- a/src/docs/user/connectors.txt +++ b/src/docs/user/connectors.txt @@ -310,3 +310,59 @@ $ sqoop export \ --export-dir hdfsdir \ --input-fields-terminated-by "\t" ---- + +Null string handling +^^^^^^^^^^^^^^^^^^^^ + +Netezza direct connector supports the null-string features of Sqoop. The null +string values are converted to appropriate external table options during export +and import operations. + +.Supported export control arguments: +[grid="all"] +`----------------------------------------`--------------------------------------- +Argument Description +--------------------------------------------------------------------------------- ++\--input-null-string <null-string>+ The string to be interpreted as\ + null for string columns. ++\--input-null-non-string <null-string>+ The string to be interpreted as\ + null for non string columns. +--------------------------------------------------------------------------------- + +In the case of Netezza direct mode connector, both the arguments must be +left to the default values or explicitly set to the same value. Furthermore +the null string value is restricted to 0-4 utf8 characters. + +On export, for non-string columns, if the chosen null value is a valid +representation in the column domain, then the column might not be loaded as +null. For example, if the null string value is specified as "1", then on +export, any occurrence of "1" in the input file will be loaded as value 1 +instead of NULL for int columns. + +It is suggested that the null value be specified as empty string for +performance and consistency. + +.Supported import control arguments: +[grid="all"] +`----------------------------------------`--------------------------------------- +Argument Description +--------------------------------------------------------------------------------- ++\--null-string <null-string>+ The string to be interpreted as\ + null for string columns. ++\--null-non-string <null-string>+ The string to be interpreted as\ + null for non string columns. +--------------------------------------------------------------------------------- + +In the case of Netezza direct mode connector, both the arguments must be +left to the default values or explicitly set to the same value. Furthermore +the null string value is restricted to 0-4 utf8 characters. + +On import, for non-string columns, the chosen null value in current +implementations the null value representation is ignored for non character +columns. For example, if the null string value is specified as "\N", then on +import, any occurrence of NULL for non-char columns in the table will be +imported as an empty string instead of '\N', the chosen null string +representation. + +It is suggested that the null value be specified as empty string for +performance and consistency.
