Skip to content

Instantly share code, notes, and snippets.

@sllynn
Created September 17, 2019 14:05
Show Gist options
  • Save sllynn/a2474fb4dfd2bde234c3dda6d07d1229 to your computer and use it in GitHub Desktop.
Save sllynn/a2474fb4dfd2bde234c3dda6d07d1229 to your computer and use it in GitHub Desktop.
connect to snowflake using sparklyr
library(sparklyr)
SparkR::sparkR.session()
sc <- spark_connect(method="databricks")
snow.df.sparklyr <- spark_read_source(
sc=sc,
name = "adult",
source = "snowflake",
options = list(
sfUrl = "ui14160.snowflakecomputing.com:443", # replace this with your own
sfUser = user,
sfPassword = password,
sfDatabase = "DEMO",
sfSchema = "databricks_demo",
sfWarehouse = "DEMO_CLUSTER",
dbtable = "adult"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment