Sqoop CLI

Contents

Overview

This section includes the reference documentation for the Sqoop CLI shell. All Sqoop commands are invoked by the bin/sqoop script.

The Sqoop shell usage is as follows:

$ sqoop COMMAND [<GENERIC_OPTIONS>] [<SPECIFIC_OPTIONS>]

where <GENERIC_OPTIONS> are preceeded by a single dash character (-). <SPECIFIC_OPTIONS> start with two dashes (--), unless they are single character arguments.

Commands

Sqoop provides the following tools.

Command Description

codegen

Generates Java classes that encapsulate and interpret imported records

create-hive-table

Populates a Hive metastore with a definition for a table based on a database table previously imported to HDFS, or one planned to be imported

eval

Allows users to quickly run simple SQL queries against a database; results are printed to the console

export

Exports a set of files from HDFS back to an RDBMS

help

Lists tools available in Sqoop and explains their usage

import-all-tables

Imports a set of tables from an RDBMS to HDFS

import-mainframe

Imports all sequential datasets in a partitioned dataset (PDS) on a mainframe to HDFS

import

Imports an individual table from an RDBMS to HDFS

job

Allows users to create and work with saved jobs

list-databases

Lists database schemas present on a server

list-tables

Lists tables present in a database

merge

Allows users to combine two datasets where entries in one dataset should overwrite entries of an older dataset

metastore

Configures Sqoop to host a shared metadata repository

version

Displays version information for Sqoop

Found a mistake? Seleсt text and press Ctrl+Enter to report it