Consider the following rules and guidelines when you configure a Sqoop query in a mapping:
To override the default query in a mapping with an advanced query, you must define a mapping parameter and set its value to $CONDITIONS. You must then include $CONDITIONS in the WHERE clause of the custom query.
If you define a custom query, you must verify that the metadata of the custom query matches the metadata of the source object. Otherwise, Sqoop might write blank values to the target.
When you enable OraOop and configure an advanced query to read data from an Oracle source through Sqoop, the mapping fails on the Spark engine.