Created on 04-16-2020 10:14 AM - edited 04-16-2020 10:50 AM
Hello,
I am trying to export data from a simple parquet table using sqoop to a simple oracle table with 3 columns. Here is my oracle table:
create table xref_tst ( retailer_nm varchar2(200), sku_id number, account_nbr int);
ALTER TABLE xref_tst
ADD CONSTRAINT sku_pk PRIMARY KEY (sku_id);
Here is my sqoop export statement. Now when I run this first one below this it works fine and insert data into my empty oracle table. But when I add the 2 update lines in the second at the end it won't insert into my empty table. Does the update mode not work with hcatalog? What am I missing?
works:
sqoop export \
--connect "jdbc:oracle:thin:@rmohsxd01.oracleoutsourcing.com:30712:db" \
--username user \
--password pass \
--table xref_tst \
--columns retailer_nm,sku_id,account_nbr \
--hcatalog-table "xref_testing " \
--hcatalog-database "sil_db"
doesn't work:
sqoop export \
--connect "jdbc:oracle:thin:@rmohsxd01.oracleoutsourcing.com:30712:db" \
--username user \
--password pass \
--table xref_tst \
--columns retailer_nm,sku_id,account_nbr \
--hcatalog-table "xref_testing " \
--hcatalog-database "sil_db" \
--update-key sku_id \
--update-mode allowinsert
Created 04-16-2020 02:29 PM
On the surface it looks like your second command should work too, since you've provided the --update-mode allowinsert parameter. Can you execute the second command with additional --verbose option and provide the output here?