RStudio

Apache Hive

Driver Options

There are many options to obtain an ODBC driver. It will ultimately depend on the Operating System you are connecting from, and the data lake’s vendor (Cloudera, Hortonworks, etc.).

Package Options

The odbc package, in combination with a driver, provides DBI support and an ODBC connection.

Connection Settings

There are five settings needed to make a connection:

  • Driver - See the Drivers section for setup information
  • Host - A network path to the database server
  • Schema - The name of the schema
  • UID - The user’s network ID or server local account
  • PWD - The account’s password
  • Port - Should be set to 10000
con <- DBI::dbConnect(odbc::odbc(),
                      Driver = "[your driver's name]",
                      Host   = "[your server's path]",
                      Schema = "[your schema's name]",
                      UID    = rstudioapi::askForPassword("Database user"),
                      PWD    = rstudioapi::askForPassword("Database password"),
                      Port   = 10000)