Cassandra
Driver Options
- Posit Professional Drivers - Workbench, RStudio Desktop Pro, Connect, or Shiny Server Pro users can download and use Posit Professional Drivers at no additional charge. These drivers include an ODBC connector for Apache Impala. Posit delivers standards-based, supported, professional ODBC drivers. Use Posit Professional Drivers when you run R or Shiny with your production systems. See the Posit Professional Drivers for more information.
Package Options
The odbc
package, in combination with a driver, provides DBI
support and an ODBC connection.
Connection Settings
There are settings needed to make a connection:
Driver
- See the Drivers section for setup informationHost
- A network path to the database serverPort
- Should be set to 9042Keyspace
- Data replication namespace (not required)AuthMec
- Use 0 for no authentication, and 1 for user name/passwordUID
- The user’s network ID or server local accountPWD
- The account’s password
<- DBI::dbConnect(odbc::odbc(),
con Driver = "[your driver's name]",
Host = "[your server's path or name]",
Port = 9042,
Keyspace = "[your keypace's name]",
AuthMech = 1,
UID = rstudioapi::askForPassword("Database user"),
PWD = rstudioapi::askForPassword("Database password")
)