| SUPPORTED_CONNECTION_ATTRIBUTES {odbc} | R Documentation |
Supported Connection Attributes
Description
These (pre) connection attributes are supported and can be passed as
part of the dbConnect call in the named list attributes parameter:
Details
-
azure_token: This should be a string scalar; in particular Azure Active Directory authentication token. Only for use with Microsoft SQL Server and with limited support away from the OEM Microsoft driver. -
sf_private_key: This parameter is specific to establishing a connection tosnowflakeand is understood by both OEM, as well asPositpro drivers. Argument should be a string (scalar); in particular a PEM-encoded private key. Note, if using private key authentication, theauthenticatorconnection string attribute must be set toSNOWFLAKE_JWT. Using this connection attribute is an alternative to using thePRIV_KEY_FILEconnection string attribute. -
sf_private_key_password: If key passed usingsf_private_keyis encrypted, you can use this attribute to communicate the password.
Examples
## Not run:
conn <- dbConnect(
odbc::odbc(),
dsn = "my_azure_mssql_db",
Encrypt = "yes",
attributes = list("azure_token" = .token)
conn <- dbConnect(
odbc::odbc(),
dsn = "snowflake",
attributes = list("sf_private_key" = paste(readLines("<path-to-private-key-file>"), collapse="\n"),
"sf_private_key_password" = "<optional-private-key-encryption-password>"),
authenticator = "SNOWFLAKE_JWT")
## End(Not run)