Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Sqoop import data using stored procedure

avatar
Rising Star
Hi,
 
I have a Stored Procedure (that runs a select query ) to import data from a DB2 database
 
How can I use it in sqoop?
I'm using the version 1.4.4-cdh5.0.2 of sqoop
 
 
I have tried to launch this command:
 
sqoop import --verbose --connect jdbc:db2://hostname:5300/db --username username --password password  --call NameStoredProcedure -m 1 --target-dir /tmp/DeltaY0/

 

 
But this doesn't work !!!
 
Have you any idea ? How can I solve it ?
 
Thanks
Alessio
 
 
 
 
1 ACCEPTED SOLUTION

avatar
Expert Contributor
Stored procedures are an export only feature. See https://issues.apache.org/jira/browse/SQOOP-769 for more information.

View solution in original post

4 REPLIES 4

avatar
Expert Contributor
Stored procedures are an export only feature. See https://issues.apache.org/jira/browse/SQOOP-769 for more information.

avatar
New Member

 How do we import more than one table in sqoop, lets say i have two table one is employee and other one is department and both are having primary-foreign key constraints , i want to import some columns from employee table and some from department based on primary-foreign key.

avatar
New Member

2 options.

 

1) import all the data (it's called big data for a reason)

 

2) create a View in your RDBS and sqoop will treat that like a table.

 

Cheers

Pete

 

avatar
New Contributor

for this requirment you can write join quiry withing sqoop import statement..coz of this u can import only required data in hadoop ecosystem.