Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

New Contributor
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

Accepted Solutions
Highlighted

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

New Contributor

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
Highlighted

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

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.

Highlighted

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

Highlighted

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

New Contributor

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

Highlighted

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

New Contributor
  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
Don't have an account?
Coming from Hortonworks? Activate your account here