0

I have a sqoop query like this.

sqoop import -Ddb2.jcc.sslConnection=true --connect jdbc:db2://192.1.1.2:6060/DB2M --username ${username}  --password $password --query "
SELECT ACCOUNT_DATE,DIV_VALUE,from ${qualifier}.DTL where year = '${year}' AND SUBSTR(LOSS_TRAN,1,1) NOT IN ('1','9') and \$CONDITIONS " -m 500 --split-by "DIV_VALUE" --fields-terminated-by '|' --target-dir s3://test${env}/${year}

The split by command is throwing an exception. I am not able to pass string into Split by function.Any help would be appreciated.

Teju Priya
  • 595
  • 3
  • 8
  • 18

1 Answers1

1

Split, by default look for the integer column. If you want to perform splitting using string column, you need to enable property: -Dorg.apache.sqoop.splitter.allow_text_splitter=true in your Sqoop command.

Sandeep Singh
  • 7,790
  • 4
  • 43
  • 68