May 2017
Beginner to intermediate
596 pages
15h 2m
English
Sqoop when compiled comes with a set of shell scripts that invoke the Sqoop jobs. All the Sqoop operations are performed via a single shell script, which can be found inside ${SQOOP_HOME}/bin, i.e. sqoop.sh. In order to perform a data import from the configured sources, i.e. postgresql database into HDFS, the shell command can be run as given:
bin/sqoop import --connect jdbc:postgresql://<DB_SERVER_ADDRESS>/<DB_NAME>?schema=<SCHEMA> --table <TABLE_NAME> --m 1 --username <DB_USER_NAME> --password <DB_PASSWORD>Where: <DB_SERVER_ADDRESS> → Address (hostname/IP) of the database <DB_NAME> → Database Name <SCHEMA> → Database Schema where the source table exists <TABLE_NAME> → Name of the table to be imported <DB_USER_NAME> → Name ...