Appendix A — Appendix A: Setup
Account, roles, and first-run checklist
snowflake, R, RStudio, Posit, VS Code, workspace notebooks, snowflakeR, RSnowflake, mlops
A.1 Snowflake account prerequisites
Before R packages can run, Snowflake roles need appropriate grants. Requirements vary by feature:
| Feature | Typical grants |
|---|---|
| SQL / RSnowflake | USAGE on warehouse, database, schema; SELECT on tables |
| Workspace Notebooks | Notebook execution, compute pool for ML Container Runtime |
| Feature Store / Registry | ML object privileges per Snowflake ML RBAC |
| SPCS / doSnowflake | USAGE on compute pool; CREATE SERVICE; image repository access |
| EAI bootstrap | CREATE INTEGRATION or admin runs printed SQL |
Work with your Snowflake admin to provision a development role with ML privileges before production promotion.
A.2 Local development setup
Full detail: Local R Setup, RStudio, Posit & VS Code.
RSnowflake only — no Python step required.
snowflakeR — configure Python:
snowflakeR::sfr_install_python_deps() # or pip/venv per chapter 03
snowflakeR::sfr_check_environment()A.2.1 connections.toml
Create ~/.snowflake/connections.toml with at least one profile. Shared by CLI, Python, RSnowflake, and snowflakeR — see authentication options.
[default]
account = "ORG-ACCOUNT"
user = "MYUSER"
authenticator = "externalbrowser"
warehouse = "DEV_WH"
database = "DEV_DB"
schema = "PUBLIC"
role = "ANALYST"Verify:
library(RSnowflake)
con <- DBI::dbConnect(Snowflake(), name = "default")
DBI::dbGetQuery(con, "SELECT CURRENT_USER()")A.3 Workspace first run
| Step | Action |
|---|---|
| 1 | Create Workspace project; connect Git repo (optional) |
| 2 | Add snowflaker_config.yaml and reference sfnb_setup.py |
| 3 | Run Python bootstrap cell (setup_notebook) |
| 4 | Enable External Access in Snowsight if prompted |
| 5 | Run %%R smoke test (sfr_connect(), dbConnect(Snowflake())) |
| 6 | Open workspace_quickstart.ipynb as reference |
Notebooks not next to sfnb_setup.py need /filesystem/ path discovery — Bootstrap — filesystem.
A.4 Optional: Posit Workbench Native App
If your account deploys Posit Workbench as a Native App, install the same R packages in the Workbench session and use connections.toml or inherited Snowflake auth — same APIs as desktop RStudio.