-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQL Connector Bindings + SQL Execution API (#44)
Changes * Adding tests for sql connector and sql execution api * Adjusting db_host(), no longer required to specify scheme (https/http) as brickster now will override to https. * Incrementing to 0.2.2 * Skip sql connector tests when env isn't available * Adjusting docs for R CMD Check --------- Co-authored-by: Zac Davies <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,779 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on_databricks <- function() { | ||
dbr <- Sys.getenv("DATABRICKS_RUNTIME_VERSION") | ||
dbr != "" | ||
} | ||
|
||
in_databricks_nb <- function() { | ||
("/databricks/spark/R/lib" %in% .libPaths()) && | ||
exists("DATABRICKS_GUID", envir = .GlobalEnv) | ||
} | ||
|
||
use_posit_repo <- function() { | ||
if (in_databricks_nb()) { | ||
codename <- system("lsb_release -c --short", intern = T) | ||
mirror <- paste0("https://packagemanager.posit.co/cran/__linux__/", codename, "/latest") | ||
options(repos = c(POSIT = mirror)) | ||
} | ||
} | ||
|
||
#' Determine brickster virtualenv | ||
#' | ||
#' @details Returns `NULL` when running within Databricks, | ||
#' otherwise `"r-brickster"` | ||
#' | ||
#' @export | ||
determine_brickster_venv <- function() { | ||
if (on_databricks()) { | ||
NULL | ||
} else { | ||
"r-brickster" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.