216.Sqoop Export – Using update-mode – update-only (default)

  • Command to launch hive connecting to the specified database
    • hive --database training_sqoop_retail
  • Command to get meta-data on table
    • DESCRIBE FORMATTED daily_revenue;
  • Command to export¬†
    • sqoop export --connect jdbc:mysql://ms.itversity.com:3306/retail_export --username retail_user --password itversity --export-dir /apps/hive/warehouse/training_sqoop_retail.db/daily_revenue --table training_daily_revenue --update-key order_date
  • Command to connect to mysql
    • mysql -u retail_user -h ms.itversity.com -p
  • To validate table
    • SELECT * FROM training_daily_revenue;

Share this post