Cloudera Tutorial : Import From Mysql to Avro with Impala and query with Hive

Cloudera Tutorial : Import From Mysql to Avro with Impala and query with Hive

 

Command Line for Sqoop :

[cloudera@quickstart ~]$ sqoop import-all-tables \
-m 1 \
–connect jdbc:mysql://quickstart:3306/retail_db \
–username=retail_dba \
–password=cloudera \
–compression-codec=snappy \
–as-avrodatafile \
–warehouse-dir=/user/hive/warehouse

 

When this command is complete, confirm that your Avro data files exist in HDFS.

[cloudera@quickstart ~]$ hadoop fs -ls /user/hive/warehouse

 

Sqoop should also have created schema files for this data in your home directory.
Avro schema files: 

Leave a Reply