Support Questions
Find answers, ask questions, and share your expertise

Boundary-query not working in cloudera

Highlighted

Boundary-query not working in cloudera

New Contributor

I am trying to include boundary query in the sqoop script in cloudera. But, i am getting incompatible value. Could you please confirm if boundary-query can be used for sqoop import.

1 REPLY 1
Highlighted

Re: Boundary-query not working in cloudera

Expert Contributor

In general please try to include as much relevant information as possible, at minimum:

 

1. I am trying to run this exact scoop command

2. It gives me this exact error.

 

----

 

That being said, I suspect that you have an invalid query in your boundary-query.

 

Please start by staying as close to the documentation as possible. Assuming your import works without using the boundary-query, here is what we see in the documentation:

 

--boundary-query select min(<split-by>), max(<split-by>) from <table name>

This could for example translate to:

 

--boundary-query select min(cust_id), max(cust_id) from customer

 

From here, build up towards what you are actually looking for, two more creative (and untested) examples:

 

--boundary-query select min(cust_id), 2*max(cust_id) from customer

--boundary-query select 0, 10000 

Hopefully this helps, otherwise please indicate the step where you got stuck and provide as much relevant context as possible (including the exact command and output!).

 


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'. Also check out my techincal portfolio at https://portfolio.jaheruddin.nl
Don't have an account?