Skip to content

Commit

Permalink
Update QuickstartNotebook.r
Browse files Browse the repository at this point in the history
Improve the SparkR library load
  • Loading branch information
a0x8o authored Oct 1, 2023
1 parent 9be6b47 commit e4fe62a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions notebooks/examples/R/QuickstartNotebook.r
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ print(paste0("The raw data is stored in ", raw_path))

# COMMAND ----------

dbutils.fs.ls('dbfs:/databricks/mosaic/sparkrMosaic_0.3.4.tar.gz')

mosaic_lib <- dbutils.fs.ls('dbfs:/databricks/mosaic/sparkrMosaic_0.3.4.tar.gz')
lib_path <- sapply(mosaic_lib, function(obj) obj$path)
lib_path <- lapply(lib_path, function(path) gsub('dbfs:/ml', '/dbfs/ml', path))
lib_path

# COMMAND ----------


library(tidyverse)
library(SparkR)
sparkr_mosaic_package_path = '/dbfs/databricks/mosaic/sparkrMosaic_0.3.4.tar.gz'
sparkr_mosaic_package_path = '/dbfs/databricks/mosaic/sparkrMosaic_0.3.4.tar.gz' # extract from above cell
# sparkr_mosaic_package_path = lib_path
install.packages(sparkr_mosaic_package_path, repos=NULL)
library(sparkrMosaic)
sparkrMosaic::enableMosaic()
Expand Down

0 comments on commit e4fe62a

Please sign in to comment.