Skip to content

Instantly share code, notes, and snippets.

@colinbendell
Last active February 24, 2021 13:48
Show Gist options
  • Save colinbendell/e1895017bf656e25d66bf3fdac18f039 to your computer and use it in GitHub Desktop.
Save colinbendell/e1895017bf656e25d66bf3fdac18f039 to your computer and use it in GitHub Desktop.
simple query in R backing against snowflake
library(dbplyr)
library(dplyr.snowflakedb)
options(dplyr.jdbc.classpath = "~/Downloads/snowflake-jdbc-3.5.3.jar")
# Update with credentials
snowflake_db <- src_snowflakedb(user = ""password = "", account = "ab123456", region = "us-east-1", opts = list(warehouse = "import", db = "cloudinary", schema = "public"))
benchmarks <- tbl(snowflake_db, in_schema("cto","lossy_benchmark_fast_v1_1"))
benchmarks %>%
rename_all(tolower) %>%
group_by(format) %>%
summarize(n = n()) %>%
kable()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment