4
votes

I am using below Sqoop syntax to split Sqoop job by single column[mostly primary key].

sqoop import --connect jdbc:oracle:thin:@//oracle_server:1521/sid --username xxx --password xxx --table EMPLOYEE --split-by ID -m 10

Can we use multiple columns as combination, if primary key is not available to split Sqoop job?

sqoop import --connect jdbc:oracle:thin:@//oracle_server:1521/sid --username xxx --password xxx --table EMPLOYEE --split-by FIRST_NAME,LAST_NAME -m 10

1

1 Answers

3
votes

No. We can use only one column in Split-by otherwise you will get the error message - Invalid column name 'FIRST_NAME,LAST_NAME'.

Please note that if you do not have the split-by column, then you have to explicitly set the --num-mappers 1 or -m 1