1

I have a unixODBC connection with hive:

isql -v Hive
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> 

E.g. select install_dt, count(1) from device_metrics.sometable where install_dt >= '2020-04-10' group by install_dt;

Returns expected results.

I would like to run this query but with some hive variable settings. For example, I would liek to set the execution engine to be mr not default tez. When connected to hive directly, outside of odbc I can just do:

set hive.execution.engine=mr;
select ... [my query to run with mr here...

With isql I tried this:

SQL> set hive.execution.engine=mr;
SQLRowCount returns -1

I'm not really sure what SQLRowCount returns -1 but I guess it means either it was an error or no rows were affected?

Either way, I tried running my select query again after trying to configure this setting:

SQL> set hive.execution.engine=mr;
SQLRowCount returns -1
select install_dt, count(1) from device_metrics.sometable where install_dt >= '2020-04-10' group by install_dt;

When I then look at our hadoop running applications page I can see my second attempt at the query but it's still running with tez. Expected and desired behavior was that it would run with mr.

Is it possible configure hive settings with unixODBC connection? If so How can I tell hive to use mr engine and not tez?

Doug Fir
  • 14,921
  • 39
  • 121
  • 228

0 Answers0