Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Sqoop Netezza connector syntax for --ctrl-chars --trunc-string

avatar
Hi I am trying to run sqoop command with options --ctrl-chars  --trunc-string
I am getting an errors saying 

17/04/04 14:23:09 ERROR tool.BaseSqoopTool: Error parsing arguments for export:
17/04/04 14:23:09 ERROR tool.BaseSqoopTool: Unrecognized argument: -ctrl-chars
17/04/04 14:23:09 ERROR tool.BaseSqoopTool: Unrecognized argument: -trunc-string
17/04/04 14:23:09 ERROR tool.BaseSqoopTool: Unrecognized argument: -max-errors

Sqoop version 1.4.6.2.5.3.0-37
Hortonworks HDP 2.5.3


My sqoop command is as below.

sqoop-export \
 -Dmapreduce.job.queuename=analyst \
 -Dmapreduce.job.name=web_event.sqp \
 --direct \
 --connect jdbc:netezza://fdhgfgjhkj:5480/dghnfgjhnfgj \
 --table fgjhfgjj \
 --username rjrjtru \
 -P \
 --export-dir /dataset-ste/secure-p/inbound/rtujrjryiutydidti/ \
 --input-escaped-by '\\' \
 --input-fields-terminated-by '\t' \
 --input-lines-terminated-by '\n' \
 --input-null-string '\\N' \
 --input-null-non-string '\\N' \
 -m 4 \
 --verbose \
 --ctrl-chars 
 --trunc-string 
 -max-errors #0
1 ACCEPTED SOLUTION

avatar
New Member

Netezza driver with direct mode would support --ctrl-chars option. Please make sure to use this option with preceeding --, like sqoop import --direct --connect jdbc:netezza://<netezza_host>:5480/db --username user -P --table table --targe-dir hdfsdir \ – --ctrl-chars --crin-string --ignore-zero --trunc-string options

View solution in original post

4 REPLIES 4

avatar
Guru

@Rajesh Babu Devabhaktuni

Try stripping the command and use less options. Try and break it in to chunks to see where the problem is.

avatar

avatar
New Member

Netezza driver with direct mode would support --ctrl-chars option. Please make sure to use this option with preceeding --, like sqoop import --direct --connect jdbc:netezza://<netezza_host>:5480/db --username user -P --table table --targe-dir hdfsdir \ – --ctrl-chars --crin-string --ignore-zero --trunc-string options

avatar
  1. This works
  2. sqoop-export \
  3. -Dmapreduce.job.queuename=analyst \
  4. -Dmapreduce.job.name=web_event.sqp \
  5. --direct \
  6. --connect jdbc:netezza://fdhgfgjhkj:5480/dghnfgjhnfgj \
  7. --table fgjhfgjj \
  8. --username rjrjtru \
  9. -P \
  10. --export-dir /dataset-ste/secure-p/inbound/rtujrjryiutydidti/ \
  11. --input-escaped-by'\\' \
  12. --input-fields-terminated-by'\t' \
  13. --input-lines-terminated-by'\n' \
  14. --input-null-string'\\N' \
  15. --input-null-non-string'\\N' \
  16. -m 4 \
  17. --verbose \
  18. -- \
  19. --ctrl-chars \
  20. --trunc-string \
  21. -max-errors 20