193.Sqoop Import – Dealing with NULL Values

  • Command to deal with null values in a numeric column in a table while importing data
    • sqoop import --connect jdbc:mysql://ms.itversity.com:3306/hr_db --username hr_user --password itversity --table employees --warehouse-dir /user/training/sqoop_import/hr_db --delete-target-dir --null-non-string "-1"
  • Command to validate files created
    • hadoop fs -get /user/training/sqoop_import/hr_db/employees .
    • view part-m-00000

Share this post