sqoop list-tables \
--username ${USER} -P \
--connect jdbc:postgresql://${SERVER}/${DB}
sqoop import \
--username ${USER} --password ${PASSWORD} \
--connect jdbc:postgresql://${SERVER}/${DB} \
--table mytable \
--target-dir /user/username/mytable \
--num-mappers 1
sqoop import \
--username ${USER} --password ${PASSWORD} \
--connect jdbc:postgresql://${SERVER}/${DB} \
--table mytable \
--target-dir /user/username/mytable \
--num-mappers 1 \
--hive-import
sqoop create-hive-table \
--username ${USER} --password ${PASSWORD} \
--connect jdbc:postgresql://${SERVER}/${DB} \
--table mytable
First create table into PostgreSQL
sqoop export \
--username ${USER} --password ${PASSWORD} \
--connect jdbc:postgresql://${SERVER}/${DB} \
--table mytable \
--export-dir /user/username/mytable \
--input-fields-terminated-by '\001' \
--num-mappers 1
For MySQL and PosgreSQL for faster performance you can use direct mode (--direct option)