Run Hive Query in R with Config

1.2k views Asked by At

I'm able to successfully connect and run queries in R from Hive using library(DBI) and library(RJDBC)

However, I'm trying to set the following config

 Set hive.execution.engine=mr;

When I try to use the following command (which is how I would query), I get an error:

 dbGetQuery(conn_expp_team, "Set hive.execution.engine=mr")

Here is the error:

 Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",  : 
 Unable to retrieve JDBC result set for Set hive.execution.engine=mr (The query did not generate a result set!)
1

There are 1 answers

0
piccolbo On

Use RJDBC::dbSendUpdate(conn, statement). Source: https://github.com/s-u/RJDBC/issues/25