Snowflake-Labs/snowflakeR
Jupyter Notebook
Captured source
source ↗Snowflake-Labs/snowflakeR
Description: R interface to the Snowflake ML platform
Language: Jupyter Notebook
License: NOASSERTION
Stars: 3
Forks: 1
Open issues: 0
Created: 2026-02-11T21:17:00Z
Pushed: 2026-06-09T11:31:04Z
Default branch: main
Fork: no
Archived: no
README:
snowflakeR
> Community Project -- Not Officially Supported > This is a community-developed project from > Snowflake Labs, not an official > Snowflake offering. It is provided as-is without warranty or official > Snowflake support. Use it for prototyping and experimentation; production > use is at your own risk. Feedback, bug reports, and contributions are > welcome via GitHub Issues.
> Author: Simon Field — SnowCAT
R interface to the Snowflake ML platform -- Model Registry, Feature Store, Datasets, and SPCS model serving. Works in local R environments (RStudio, VS Code, terminal) and Snowflake Workspace Notebooks.
> Companion package: For standard DBI-compliant database access (dbGetQuery, dbWriteTable, dbplyr, RStudio Connections Pane, etc.), see **RSnowflake**. snowflakeR focuses on ML platform features; RSnowflake provides the database connectivity layer.
Overview
snowflakeR provides idiomatic R functions for the full Snowflake ML lifecycle, whether you're working locally or directly inside Snowflake:
| Module | What it does | |---|---| | Connect | One-line connection via connections.toml, keypair, or Workspace auto-detect | | Query | Run SQL via sfr_query() / sfr_execute(), read/write tables | | Model Registry | Log R models, deploy to SPCS, warehouse & SQL-direct inference, aliases, export, batch inference, granular metrics | | Feature Store | Entities, feature views (incl. online serving, Iceberg, aggregation), slicing, introspection, training data & datasets | | Model Monitoring | Continuous drift, performance, and statistical monitoring of deployed models with segment support | | Experiment Tracking | Track runs, log parameters/metrics/artifacts, integrate with tune grid search | | Datasets | Versioned, immutable snapshots of query results for reproducible ML | | Admin | Manage compute pools, image repos, and external access integrations | | REST Inference | Pure-R prediction against SPCS service endpoints via sfr_predict_rest() | | Parallel / SPCS R | foreach via registerDoSnowflake() (local, Tasks, Hybrid Table queue); stage scripts with sfr_run_executor(); optional crew + mirai workers via crew_controller_spcs() | | Workspace Notebooks | First-class support for Snowflake Workspace Notebooks with zero-config auth and %%R magic cells | | RStudio on SPCS | Deploy kit for RStudio Server as a custom SPCS service (inst/rstudio-spcs/) |
Under the hood, snowflakeR uses `reticulate` to bridge to the `snowflake-ml-python` SDK while exposing a native R API with snake_case naming, S3 classes, and cli messaging. The same code runs identically in local R sessions and Snowflake Workspace Notebooks.
RStudio Server on SPCS
For a native RStudio IDE inside Snowflake (not %%R notebooks), use the deploy kit shipped in this package:
system.file("rstudio-spcs", package = "snowflakeR")Walkthrough: Hitchhiker's Guide — RStudio Server on SPCS. Vignettes: vignette("rstudio-spcs"), vignette("spcs-custom-services", package = "RSnowflake").
DBI / dbplyr
For full DBI compliance, dbplyr integration, and the RStudio Connections Pane, use the companion RSnowflake package. You can obtain an RSnowflake connection from an existing sfr_connection:
dbi_con filter(score > 90) |> collect()
Or connect directly with RSnowflake:
library(DBI) library(RSnowflake) con = 3.9 with the Snowflake ML packages:
Let snowflakeR install them into a dedicated virtualenv
snowflakeR::sfr_install_python_deps()
Or install manually:
pip install snowflake-ml-python snowflake-snowpark-python
## Quick start
library(snowflakeR)
Connect (reads ~/.snowflake/connections.toml by default)
conn Note: Workspace Notebooks do not auto-set database or schema. > Use setup_notebook() from sfnb_setup.py to set session context > automatically (from the YAML config or session defaults), and > sfr_fqn() to build fully qualified table names > (DATABASE.SCHEMA.TABLE). See the example notebooks below.
Example Notebooks
snowflakeR ships with a self-contained `notebooks/` directory that has everything you need to get started, including the bootstrap script and per-notebook config files:
# Find the notebooks directory in the installed package
system.file("notebooks", package = "snowflakeR")
# Or copy the entire folder to your working directory
nb_dir = 4.1.0
- Python >= 3.9
- `snowflake-ml-python` >= 1.5.0
- `snowflake-snowpark-python`
Optional:
- [`RSnowflake`](https://github.com/Snowflake-Labs/RSnowflake) -- DBI-compliant database access, `dbplyr`, RStudio Connections Pane
- [`snowflakeauth`](https://github.com/Snowflake-Labs/snowflakeauth) -- `connections.toml` credential management
## License
Apache License 2.0Excerpt shown — open the source for the full document.
Notability
notability 3.0/10Low stars, routine repo