How to import the TDV data in to Apache Sqoop?

How to import the TDV data in to Apache Sqoop?

book

Article ID: KB0081711

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization -

Description

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

First of all, we will have to add the TDV JDBC driver to the Sqoop installation as Sqoop does not ship with third-party JDBC drivers. You will just have to copy the TDV driver in to  (<TDV Install Directory>/apps/jdbc/lib/csjdbc.jar to the lib folder of your Sqoop installation. 
Example :Linux-based Hadoop distribution this will typically be the /usr/lib/sqoop/lib/ directory.

Once the TDV driver has been added to Sqoop, you can use Sqoop to transfer data between the TDV and Hadoop. 

To add this data to the Hadoop FileSystem you will just have to run the following command:

$ sqoop import --connect jdbc:compositesw@host:9400&domain=composite&datasource=datsource --table tabledemo --username admin --password admin --driver cs.jdbc.driver.CompositeDriver -m 1
where:

   The --connect parameter is the URL where the TDV server is listening.
       --table is the name of the TDV view to transfer to HDFS.
       --username and --password are the TDV authentication credentials.
       --driver is the name of the class that implements the JDBC driver, always cs.jdbc.driver.CompositeDriver for connections to TDV.
       and -m 1 is an option to perform a sequential 


$ sqoop import --connect jdbc:compositesw@host:9400&domain=composite&datasource=datsource --table tabledemo --username admin --password admin --driver cs.jdbc.driver.CompositeDriver -m 1 --hive-import
Once you run the command adding the Hive option, Sqoop will automatically add a table called tabledemo to the Hive metastore and, if you query this table using the Hive command line tool, you will see the data that you just imported.
 

Issue/Introduction

How-to-import-the-TDV-data in to Hadoop system by using Sqoop?