The documentation (http://docs.cask.co/cdap/3.4.0/en/cdap-apps/hydrator/hydrator-plugins/batchsources/database.html) for the Database Batch Source includes the importQuery:
If you set a "$CONDITIONS" string, then when you use the "Get Schema" button, that exact same "Import Query" will be used, but it will fail because the "$CONDITIONS" string will not be replaced correctly.
See the attached screenshot.
I am not sure what the correct fix is. Should the $CONDITIONS string be replaced, and that is what is missing? Does the user need to edit the query, and better instructions are required?