How to fetch data from Hive Database to R Studio?

Hi !

I would try to connect to hive like any other database, using odbc and Hive drivers. You already opened a post on this subject I think

Did you try ? https://db.rstudio.com/databases/hive/4 Advantage is that you could use dplyr after.

Otherwise, for this particular issue, a classpath problem is a jar not found I think. Hive may require too list all java dependencies individually. These dependencies should live in hadoop and hive installed dir on your environnement.
This SO answer may help :

Other option : You can use spark to deal with Hadoop data. Look at sparklyr :package: You can use Hive functions from spark. You could also use dplyr with spark and even work within the cluster.

Hopes you'll find an answer or some hints in all this.

1 Like