I guys,
I'm trying to extract only data with a filter using Sqoop. For that I'm using a Bondary query. I only want to filter the departments_id between 3 and 6. I've the following command:
[cloudera@quickstart ~]$ sqoop import --connect jdbc:mysql://localhost:3306/retail_db --username retail_dba --password cloudera --table departments --target-dir=wareouse/departments_v1 --boundary-query "SELECT department_id, department_name FROM departments WHERE department_id BETWEEN 3 AND 6"
But I am getting the following error:
18/12/05 12:48:27 ERROR tool.ImportTool: Import failed: java.io.IOException: java.sql.SQLException: Invalid value for getLong() - 'Fitness'
Do you know what I'm making wrong on my command?
The source data is like:
department_id | department_name |
+---------------+-----------------+
| 2 | Fitness |
| 3 | Footwear |
| 4 | Apparel |
| 5 | Golf |
| 6 | Outdoors |
| 7 | Fan Shop |
+---------------+-----------
Thanks!