Snowflake
Driver Options
Snowflake - Download the ODBC driver directly from Snowflake’s site: Configure an ODBC Connection
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 Redshift databases. 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 seven settings needed to make a connection:
- Driver - See the Drivers section for setup information
- Server - The URL to the database server
- UID - The user’s account ID
- PWD - The account’s password
- Database - The database name within the server
- Warehouse - The warehouse name within the database
- Schema - The schema name within the warehouse
<- DBI::dbConnect(odbc::odbc(),
con Driver = "[your driver's name]",
Server = "[your server's path]",
UID = rstudioapi::askForPassword("Database user"),
PWD = rstudioapi::askForPassword("Database password"),
Database = "[your database's name]",
Warehouse = "[your warehouse's name]",
Schema = "[your schema's name]"
)