Syntax error whe calling parameters in custom query using ?parameter_name


I am using a custom query with parameters in a Data Connection that runs against Hive a server:

where >= ?date_beg and day < ?date_end

it worked once, but when trying to define it again o use the same strategy in other dashboard, it fails due to the format of parameters calling using '?':

External error:
ERROR [HY000] [Cloudera][HiveODBC] (80) Syntax or semantic analysis error thrown in server while execurint query. Error message from server: Error while compiling statement: FAILED: ParseException line 16:20 cannot recognize input near '?' 'and' 'aa' in expression specification

Any idea about why parameters calling can be tricky?

It also has worked using to_date(?date_end)... but, again, it started to fail when redefining or reusing the strategy in other data connection.

Thank you very much!.