Created 04-29-2017 01:00 PM
I want to export hive table to RDBMS database table. I tried below command but it only works when the table is in hive "default" database.
sqoop export --connect "jdbc:sqlserver://x.x.x.x:1433;username=aaa@bbb;password=qqqq;database=dddd" --table table1 --hcatalog-table tbl1 but i want to export table from database i have created in hive.
Created 04-30-2017 08:27 PM
I think the database option should be "--hcatagol-database" otherwise the default database is used which is what the behavior you are seeing. Checkt he following document for hcatalog integration with sqoop.
Created 05-01-2017 06:51 AM
it worked for me. thank you so much.
Created 05-02-2017 02:34 PM
Thanks. If the answer helped, can you please accept it.
Created 05-01-2017 04:42 AM
sqoop export \
–connect jdbc:oracle:thin:@enkx3-scan:1521:dbName \ –username user \ –password password123 \ –direct \ –export-dir ‘/user/hive/warehouse/test_oracle.db/my_all_objects_sqoop’ \ –table testtable \ –fields-terminated-by ‘\001’
Created 05-01-2017 06:52 AM
thank you.
Created 06-14-2022 12:11 AM
I solved the issue by converting the Hive table from managed to External
CREATE EXTERNAL TABLE new_table
AS
SELECT *
FROM old_table
Created 06-14-2022 12:59 AM
Hi @Tremo, as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.
Regards,
Vidya Sargur,