Search

Can we write any default value for all the string NULLs in an RDBMS table while importing into Hive table?



Yes, we can provide our own meaningful default value to all NULL strings in source RDBMS table while loading into Hive Table with –null-string argument. Below is the sample sqoop import command
MySQL

sqoop import \
--connect jdbc:mysql://mysql.server.com/sqoop \
--table emp \
--null-string '\\N' \
--null-non-string '\\N'