Labels

Labels

Monday, May 12, 2014

Sqoop Installation

Sqoop :-

Sqoop is a project developed by Apache. It is used for importing the data from relational databases to hbase or hdfs.

So sqoop is maily used for importing the data from relational databases.

Sqoop Installation :-

1)Download the project from Apache Sqoop website and extract it into "/usr/local" folder of your file system.

2)Set the environment variables in the Home/bashrc file.

export SQOOP_HOME = /usr/local/sqoop

export PATH = $PATH : $SQOOP_HOME/bin

3) Copy the connector jar file into the sqoop lib folder.

example : - If you are connecting to mysql then you need to copy the mysql-connector.jar file into /usr/local/sqoop/lib folder.

4) Then go to sqoop bin folder and execute the following sqoop command to import the data.

$bin>sqoop import --connect jdbc:mysql://localhost:3306/maya --username maya --password fission --table metrics_20140210 --hbase-table metrics --column-family metricsdata --hbase-row-key id --hbase-create-table -m 1




No comments:

Post a Comment