Reputation: 35
I am trying to sqoop hive view to SQL server database however i'm getting "object not found error". Does sqoop export works for hive views?
sqoop export --connect 'jdbc:jtds:sqlserver:<Connection String>' --table 'tax_vw' --hcatalog-database default --hcatalog-table tax_vw --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username XXX --password YYY --update-mode allowinsert
INFO hive.metastore: Connected to metastore. ERROR tool.ExportTool: Encountered IOException running export job: java.io.IOException: NoSuchObjectException(message:default.tax_vw table not found)
Need help on this.
Upvotes: 1
Views: 482
Reputation: 38335
Unfortunately, this is not possible to do using sqoop export, even if --hcatalog-table
specified, it works only with tables and if not in HCatalog mode, it supports only exporting from directories, also no queries are supported in sqoop-export
.
You can load your view data into table:
create table tax_table as select * from default.tax_vw;
And use --hcatalog-table tax_table
Upvotes: 1