0% found this document useful (0 votes)
19 views1 page

Sqoop Commands for Hive Integration

The document provides a guide to using Sqoop commands, including options for generating code, importing tables, and exporting data. It explains how to access help for specific commands and utilize command aliases. Additionally, it describes how to control Hadoop installations when running Sqoop commands.

Uploaded by

smrsoftsol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Sqoop Commands for Hive Integration

The document provides a guide to using Sqoop commands, including options for generating code, importing tables, and exporting data. It explains how to access help for specific commands and utilize command aliases. Additionally, it describes how to control Hadoop installations when running Sqoop commands.

Uploaded by

smrsoftsol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

$ sqoop help

usage: sqoop COMMAND [ARGS]

Table. 1 Sqoop Tutorial – Available Sqoop 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
list-databases List available databases on a server
list-tables List available tables in a database
version Display version information
Also, by entering sqoop help (tool-name), we can display help for a
specific tool. Like, sqoop help import.

In addition, we can also add the –help argument to any Sqoop


command: sqoop import –help.

a. Using Command Aliases


We can use alias scripts by typing the sqoop (toolname) syntax.
Basically, that specifies the sqoop-(toolname) syntax. Like, the
scripts sqoop-import, sqoop-export and many more. Although, each
select a specific tool.
b. Controlling the Hadoop Installation
To elicit Sqoop we can use the program launch capability provided
by Hadoop. To run the bin/hadoop script shipped with Hadoop, we
can use the sqoop command-line program wrapper. Since there are
multiple installations of Hadoop present on your machine, we can
easily select the Hadoop installation just by setting the
$HADOOP_COMMON_HOME and $HADOOP_MAPRED_HOME
environment variables.

Intern
al

You might also like