Tuesday 26 August 2014

Working with Sqoop

Apache Sqoop

Apache Sqoop(TM) is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases.

sqoop-1.4.4.bin__hadoop-1.0.0.tar.gz installation

$ tar -xvf sqoop-1.4.4.bin__hadoop-1.0.0.tar.gz

$ mv sqoop-1.4.4.bin__hadoop-1.0.0 sqoop144_h100

$ sudo gedit .bashrc

$ . .bashrc

Test sqoop installation with the command

$ sqoop144_h100/bin/sqoop help

Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: $HADOOP_HOME is deprecated.

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
  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.

hduser2@bala:~$




No comments:

Post a Comment