Commands

Sqoop Commands

To run the Sqoop commands, you need shell access on the Invariant edge servers.

Sqoop Help

To access help and see details of commands use the following command

[devuser@inv121 ~]$ Sqoop help
Output
usage: sqoop COMMAND [ARGS]

Available commands:

  codegen            Generate code to interact with database records
  create-hive-table  Import a table definition into Hive
  eval               Evaluate a SQL statement and display the results
  export             Export an HDFS directory to a database table
  help               List available commands
  import             Import a table from a database to HDFS
  import-all-tables  Import tables from a database to HDFS
  import-mainframe   Import datasets from a mainframe server to HDFS
  job                Work with saved jobs
  list-databases     List available databases on a server
  list-tables        List available tables in a database
  merge              Merge results of incremental imports
  metastore          Run a standalone Sqoop metastore
  version            Display version information

See 'sqoop help COMMAND' for information on a specific command.

Each command has specific arguments. The help command can display these arguments when you use the commands as a parameter. For example here is the syntax for displaying the arguments for the frequently used import command.

output

List databases

This command lists the databases that your account is allowed to access.

List Tables

This command lists the tables available.

Again the syntax is straightforward requiring just a connect argument. But in this case you need to specify the database in the connection string as well.

Last updated