hadoop - Updating hive table with sqoop from mysql table -


i have hive table called roles. need update table info coming mysql. so, have used script think add , update new data on hive table:`

sqoop import --connect jdbc:mysql://nn01.itversity.com/retail_export --username retail_dba --password itversity \ --table roles --split-by id_emp --check-column id_emp --last-value 5 --incremental append \ --target-dir /user/ingenieroandresangel/hive/roles --hive-import --hive-database poc --hive-table roles 

unfortunately, insert new data can't update record exits. before ask couple of statements:

  • the table doesn't have pk

  • if dont specify --last-value parameter duplicated records exist.

how figure out without applying truncate table or recreate table using pk? exist way?

thanks guys.

hive not operate update queries. have drop/truncate old table , reload again.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -