Sqoop CMD to export MYSQL table to Hive

Here is the handy command to run quickly without referring  the official Sqoop long help !! , This  command needs  minimum import control argument for a faster export  and we are assuming that  same table doesn’t  exist in Hive as well , else command will fail by throwing the error “AlreadyExistsException(message:Table struct_data already exists)” Sqoop […]

Read More…

Hive commands at your fingertips

  CREATE TABLE Syntax. CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name (col_name data_type [COMMENT ‘col_comment’], …) [COMMENT ‘table_comment’] [WITH SERDEPROPERTIES (‘key1’=’value1’, ‘key2’=’value2’, …)] [ROW FORMAT row_format] [STORED AS file_format] [LOCATION ‘hdfs_path’] [TBLPROPERTIES (‘key1’=’value1’, ‘key2’=’value2’, …)] CREATE TABLE Example. CREATE EXTERNAL TABLE IF NOT EXISTS XYZ.CUSTOMER (Cust_no int COMMENT ‘Customer Number ‘,Cust_name string COMMENT ‘Customer Name ‘) COMMENT […]

Read More…