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.
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.
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’