Skip to content

Commit

Permalink
chore(r/adbcsnowflake): Add application name to Snowflake driver (#1532)
Browse files Browse the repository at this point in the history
A follow-up to #1525 to add an
R-specific prefix for the Snowflake driver. We could allow this to be
customized, too, but I would prefer to that feature to be requested
before pursuing it.

Closes #1526.
  • Loading branch information
paleolimbot authored Feb 12, 2024
1 parent 81fdc7a commit dd08add
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion r/adbcsnowflake/R/adbcsnowflake-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ adbcsnowflake <- function() {
#' @importFrom adbcdrivermanager adbc_database_init
#' @export
adbc_database_init.adbcsnowflake_driver_snowflake <- function(driver, ..., uri = NULL) {
options <- list(..., uri = uri)
options <- list(
...,
uri = uri,
adbc.snowflake.sql.client_option.app_name = paste0(
"[ADBC][R-",
packageVersion("adbcsnowflake"),
"]"
)
)

adbcdrivermanager::adbc_database_init_default(
driver,
options,
Expand Down

0 comments on commit dd08add

Please sign in to comment.