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 export syntax to export hive table to Sql Server Database table.

sqoop export syntax to export hive table to Sql Server Database table.

Expert Contributor

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.

5 REPLIES 5

Re: sqoop export syntax to export hive table to Sql Server Database table.

Super Guru
@heta desai

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.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.2/bk_dataintegration/content/sqoop-hcatalog-i...

Re: sqoop export syntax to export hive table to Sql Server Database table.

Expert Contributor

it worked for me. thank you so much.

Re: sqoop export syntax to export hive table to Sql Server Database table.

Super Guru

@heta desai

Thanks. If the answer helped, can you please accept it.

Re: sqoop export syntax to export hive table to Sql Server Database table.

New Contributor

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’

Re: sqoop export syntax to export hive table to Sql Server Database table.

Expert Contributor

thank you.

Don't have an account?
Coming from Hortonworks? Activate your account here