Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

sqoop and --hive-import how to define destination folder for hive/warehouse

Solved Go to solution

sqoop and --hive-import how to define destination folder for hive/warehouse

Explorer

is it possible to specify the hive-table destionation when using sqoop with the -hive-import switch.

 

the script below is creating the tables at the root of /user/hive/warehouse.  I'd like them in a single directory that I specify.

 

using --hive-home was a guess but it is not working.  Thanks

 

sqoop import-all-tables \
--connect jdbc:oracle:thin:@//schema.domain.org:1521/schema \
--username=user -P \
--warehouse-dir '/user/choa/dev/HBOC' \
--fields-terminated-by '|' \
--hive-import \
--hive-home '/user/hive/warehouse/hboc.db' \
-m 1

1 ACCEPTED SOLUTION

Accepted Solutions

Re: sqoop and --hive-import how to define destination folder for hive/warehouse

Cloudera Employee

Hi sir,

the concept you are describing is known in Hive as external table and Sqoop currently do not supports that. It's covered by SQOOP-816:

 

https://issues.apache.org/jira/browse/SQOOP-816

 

Jarcec

1 REPLY 1

Re: sqoop and --hive-import how to define destination folder for hive/warehouse

Cloudera Employee

Hi sir,

the concept you are describing is known in Hive as external table and Sqoop currently do not supports that. It's covered by SQOOP-816:

 

https://issues.apache.org/jira/browse/SQOOP-816

 

Jarcec