Running Sqoop query with text field filter

I’m trying to perform this query in sqoop but seems like I’m not able to apply a right text filter in a string field. Here is my code:

sqoop import --connect jdbc:mysql:// --username retail_dba --password itversity \ --query ‘select year(order_date) as year,department_name,sum(revenue_per_day) from revenue where department_name=“Apparel” and $CONDITIONS group by year(order_date),department_name’ \ --split-by department_name --target-dir /user/ --fields-terminated-by ‘|’ -m 2 \

The message says: Generating splits for a textual index column allowed only in case of “-Dorg.apache.sqoop.splitter.allow_text_splitter=true” the property passed as a parameter

So what should be the right split, in this case, to perform this query if the other two columns are aggregation?

Could some of you guys check what’s wrong in my code? I have not found how to figure it out. thanks

what is the error you are getting. Please post the error messages and code togethere.

I have just to edit my post with right question!! thanks

You can do split on any field. But recommended is on indexed field. As you are doing on text field, you can use given suggestion on the error log. In u r query. i.e.
sqoop import -Dorg.apache.sqoop.splitter.allow_text_splitter=true – connect … (Other code). It will import but will not distribute the data evenly across the files.
Else you may use -m1

Buddy if you follow my code I made -m 2 to get two mappers but the error persist. thanks so much