简体   繁体   中英

Can Sqoop update record on Oracle RDBMS table that have different column structure with Hive table

I'm a Hadoop newcomer trying to export data from Hive to Oracle. Can Sqoop update data to Oracle table let say,

Oracle Table have column A,B,C,D,E

I stored data on Hive table as B,C,E

Can Sqoop export update(just update, not upsert) with B,C as update keys and update just the E column from Hive?

Pls mention --update-key Prim_key_col_in_table . Pls note --update-mode default is updateonly so you dont have to mention anything. You can also add input-fields-terminated-by command if you want to.

here is a sample command -

sqoop export --connect jdbc:mysql://xxxxxx/mytable --username xxxxx --password xxxxx --table export_sqoop_mytable --update-key Prim_key_col_in_table --export-dir /user/ingenieroandresangel/datasets/mytable.txt -m 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM