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 - split-by command doesn't work

SQOOP - split-by command doesn't work

Explorer

I have a problem with sqoop tool. Split-by commad doesn't work. The complete command I'm using is this:

 

sqoop import --connect <url_string> \
--username <username> \
--password <pasword > \
--query 'SELECT * FROM test WHERE $CONDITIONS' \
--split-by col1  \
--target-dir ~/test2 \
--boundary-query "select min(col1), max(col1) from test"

 

It just says that --split-by command is not found.

I've tried with col1 beeing primary key, not null, and with no constraint at all. It's allways the same error.

When I'm not using split-by, and when col1 is primary key, it works, but with split-by it doesn't.

 

Can somebody, please, tell me is this command wrong or maybe it has something to do with sqoop version or the fact that I'm using postgresql database? 

2 REPLIES 2

Re: SQOOP - split-by command doesn't work

Master Guru
Can you run your command with the verbose option set and post the entire output, including the command, here?
Highlighted

Re: SQOOP - split-by command doesn't work

Explorer

You wanna know what was wrong? Blank spaces at the end of a line. I know.