Sqoop tutorial 11: Handling NULL Values
You can override the NULL substitution string with the --null-string and --null-nonstring parameters to any arbitrary value.
For example, use the following command to override it to \N:
sqoop import \
--connect jdbc:mysql://mysql.example.com/sqoop \
--username sqoop \
--password sqoop \
--table cities \
--null-string '\\N' \
--null-non-string '\\N'
1. --null-string argument represents what should be writtern in HDFS whenever a NULL is identified in column defined as string in relational database.
2. --null-non-string argument works similar to --null-string argument except that it work on columns defined as non-string in relational database.
Comments
Post a Comment