Register Cloudera driver in odbcinst.ini file

I'm trying to install a driver in order to use dbplyr. Documentation here gives an example of how to connect:

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)

I visited the drivers section of the documentation to understand how to add a driver. Following this I visited Cloudera website and downloaded a driver to my Linux CentOs6 server. Then I installed it with sudo yum install ClouderaHiveODBC-

Everything appeared to run and install fine.

Now what do I do? I've added an odbc driver and I would like to know how to use it. The drivers documentation I linked to above says that I need to register the driver in /etc/odbcinst.ini. After some Google search I found this post that says " Add a new entry to the [ODBC Drivers] section. Type the driver name, and then type =Installed".

What's my driver name? [driver name]=Installed?

Same on the example dbplyr query above:
Driver = "[your driver's name]",

I don't know. I downloaded from Cloudera. The rpm file shows as "ClouderaHiveODBC-" and I've already installed it with yum.

How can I add my driver to .odbcinst.ini and what is my drivers name for use in the dbplyr connection function?

You should follow the official driver documentation when you install a driver

It includes a section on how to configure ODBC.
You'll see that you have a sample .odbcinst.ini file in the folder the driver installed.

1 Like

Thank you cderv for the link, I did not see that pdf before.