Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using dplyr to connect to SSL-encrypted remote database

Tags:

r

ssl

dplyr

odbc

rodbc

I would like to use the dplyr package in R but to connect to a remote database that is SSL-encrypted. How do I set up a workaround here? I'm thinking of setting up a backend that uses the RODBC package. Is this possible?

like image 493
Brash Equilibrium Avatar asked Mar 21 '23 05:03

Brash Equilibrium


1 Answers

Actually you can connect to a an SSL-encrypted connection with dplyr and it's easy.

You just need to pass the parameters for your connection within the dbname parameter, like this (this is a postgresql example):

db <- src_postgres(dbname="dbname=my_db sslcert=my_cert.crt sslkey=my_key.key sslmode=require", user="username", host="your.host.com")
like image 73
Dario Lacan Avatar answered Apr 02 '23 22:04

Dario Lacan