Sqoop - Import

Yarn Hortonworks

About

The sqoop import command line (ie the import command of the sqoop cli)

Type

Default

sqoop import \
   --connect jdbc:teradata://{host name or ip address}/Database=retail \
   --connection-manager org.apache.sqoop.teradata.TeradataConnManager \
   --username dbc \
   --password dbc \
   --table SOURCE_TBL \
   --target-dir /user/hive/incremental_table \
   -m 1

Incremental

via:

  • the parameters:
    • check-column,
    • incremental
    • last-value
  • or a query (ie select * from SOURCE_TBL where modified_date > {last_import_date} AND CONDITIONS)

With parameters:

sqoop import \
   --connect jdbc:teradata://{host name or ip address}/Database=retail \
   --connection-manager org.apache.sqoop.teradata.TeradataConnManager \
   --username dbc \
   --password dbc \
   --table SOURCE_TBL \
   --target-dir /user/hive/incremental_table \
   -m 1 \
   --check-column modified_date \
   --incremental lastmodified 
   --last-value {last_import_date} 

Query

  • Incremental update via query
sqoop import \
   --connect jdbc:teradata://{host name or ip address}/Database=retail \
   --connection-manager org.apache.sqoop.teradata.TeradataConnManager \
   --username dbc \
   --password dbc \
   --table SOURCE_TBL \
   --target-dir /user/hive/incremental_table \
   -m 1 \
  --query 'select * from SOURCE_TBL where modified_date > {last_import_date} AND $CONDITIONS’





Discover More
Card Puncher Data Processing
Hive - Load data

How to load data into Hive Table. This is are the following possibilities: File System operation SQL Operations Third party tools Replace the file on HDFS when the input data format is the...
Yarn Hortonworks
Sqoop - sqoop Cli

where a module called a sqoop tool import called sqoop-import - export called sqoop-export ...



Share this page:
Follow us:
Task Runner