Sqoop Import - Supported File Formats


Let us understand the different file formats using which we can import data from source databases into HDFS.

Following are the supported file formats and corresponding control arguments.

File Format Control Argument
Text File Fomrat --as-textfile
Sequence File Format --as-seequencefile
Avro File Format --as-avrodatafile
Parquet File Format --as-parquetfile

Here is the example of sqoop import using as-avrodatafile.

sqoop import \
  --connect "jdbc:mysql://ms.itversity.com:3306/retail_db" \
  --username retail_user \
  --password itversity \
  --table order_items \
  --warehouse-dir /user/training/sqoop_import/retail_db \
  --delete-target-dir \