08-08-2018 07:10 PM - last edited on 05-03-2019 08:23 AM by denloe
I am trying to use following sqoop command to move table with composite PK into hbase , but all the composite key columns are concatenated into single account column .
sqoop import --hbase-row-key 'ACCOUNT,SUBGROUP,SEGMENT,CATEGORY,' --driver com.vertica.jdbc.Driver --connect jdbc:vertica://Vertica-host.example.com:5433/vredwd01 --P --username user1 --table Fexchanges --hbase-table macr01_hb:Fexchanges --column-family account -m 1
how to split up these columns into respective columns
08-13-2018 02:47 PM
Ceck whether below is helping you (add split-by in Sqoop command):
Sqoop has no logic to handle composite primary keys.
This is for sqoop imports. If you do not specify a split-by, sqoop defaults to the PK. In the case where the table has a composite PK, it uses only the first column of the composite PK to split. This is confirmed behavior in Oracle, need to test with others.
The workaround is to specify a split-by and sqoop will not care about the PK.