Snowflake Setup Guide
Trial account and Snowsight file access
title: “Snowflake Setup Guide” subtitle: “Trial account and Snowsight file access” —
Workshop SQL lives in your fork (snowflake/sql/setup/, snowflake/sql/, snowflake/snowpark/). Link Git in Snowsight (recommended) or copy from Codespace if Git is blocked — same idea as Databricks Git folder.
Start on: Prerequisites · Exercise: Snowflake · Module 3
Create a Free Trial
- Go to signup.snowflake.com
- Use the required choices in the table below (Snowflake cannot change cloud, region, or edition later — wrong choices mean a new trial with a different email)
- Fill in your details (Training, personal learning, or Student is fine) and submit
- Open the activation email and sign in to Snowsight (check Spam/Junk if it is slow — search for snowflake)
| Setting | Required value | Why |
|---|---|---|
| Trial type | The AI Data Cloud ($400 credits) | Full platform — not Cortex Code CLI / For Developers (CLI-only trial) |
| Cloud provider | Microsoft Azure | Workshop ADLS2 storage is in Azure |
| Region | West Europe | Same region as ADLS2 — other regions often fail LIST @stage |
| Edition | Enterprise | Cortex AI/ML labs, Time Travel, Modules 3–6 & 9 |
Official reference: Snowflake trial options
After sign-in, Snowsight opens at a URL like https://app.snowflake.com/west-europe.azure/el30551/#/homepage. The path must include west-europe.azure. Account identifier for Module 4 .env: el30551.west-europe.azure (Exercise: dbt § Snowflake values).
View account details may show el30551.west-europe.azure.snowflakecomputing.com — use the full host for Power BI Server; for .env use el30551.west-europe.azure only (Exercise: dbt § Snowflake values).
Access Workshop Files
Workshop files are in your fork. Default: link the repo as a Git workspace in Snowsight — open .sql files directly and Run all from the synced tree. Requires + API Integration in the Git dialog + snowflakedb OAuth (steps below). If Git workspace create is gated on a trial account (“Workspace feature disabled: Internal only system function”), use Upload folder — works on any account. Last resort: copy from Codespace.
Per Snowflake Workspaces + Git docs.
Default path: link your fork as a Git workspace — open .sql files in Snowsight and Pull facilitator updates on Changes. Requires + API Integration in the Git dialog + snowflakedb OAuth (steps below).
| Step | What | Where |
|---|---|---|
| 1 | Link your fork + create API integration in the Git dialog | Snowsight Git workspace create dialog — use + API Integration (paste settings below) |
| 2 | Run 02 → 03 → 04 |
From the synced Git workspace (Exercise: Snowflake § setup scripts) |
| 3 | Pull after facilitator updates | Changes tab in your Git workspace |
Step 2 needs step 1 (repo linked, files in Snowsight). Details below.
1. Link your fork + API integration (GUI — start here)
Recommended: create the GitHub API integration in the Snowsight dialog — paste the integration settings into form fields, then complete OAuth. Alternative: run 01_git_api_integration.sql (below).
Choose a Git repository workspace — not dbt project (Module 4 dbt runs in Codespaces).
Open the create dialog (either path):
| Path | Steps |
|---|---|
| Sidebar + | Left sidebar → + (top) → Git repository |
| Workspaces | Workspaces (or Projects → Workspaces) → workspace-name ▾ dropdown (top-left) → Create Workspace → From Git repository |
Since Workspaces went GA (Sep 2025), the in-workspace + Add New button only creates files/folders inside the current workspace — it has no Git option. To create a Git-synced workspace, use the ▾ dropdown next to your workspace name (top-left) → Create Workspace → From Git repository. (The left-sidebar global + → Git repository still exists, but that creates a standalone GIT REPOSITORY object, not a synced workspace.)
Context selector → role ACCOUNTADMIN before Create.
Fill in (official fields — no Branch at create time):
| Field | Value |
|---|---|
| Repository URL | https://github.com/<YOUR-USERNAME>/MHPDataEngineerWorkshop.git (your fork) |
| Workspace name | Optional — default is often derived from the repo name |
| API integration | If empty → + API Integration — use the table below (name e.g. GITHUB_WORKSHOP_INTEGRATION) |
| Authentication | OAuth2 — complete GitHub OAuth below before Create |
+ API Integration — copy these into the dialog (OAuth setup):
| Setting | Value |
|---|---|
| Integration name | GITHUB_WORKSHOP_INTEGRATION (or any name — remember it for the dropdown) |
| Allowed prefixes | https://github.com (or https://github.com/<YOUR-USERNAME>) |
| Authentication | OAuth via Snowflake GitHub App (snowflakedb) |
Trial accounts: after the integration is created, ensure ACCOUNTADMIN can use it (the GUI usually handles this; the SQL script grants explicitly).
01_git_api_integration.sql)
If + API Integration is missing or the dialog fails, paste snowflake/sql/setup/01_git_api_integration.sql from Codespace into a Snowsight SQL file, Run all as ACCOUNTADMIN, then reopen the Git dialog — GITHUB_WORKSHOP_INTEGRATION should appear in the dropdown. Confirm with SHOW INTEGRATIONS LIKE 'GITHUB%'; at the end of that script.
-- Same object as + API Integration in the Git dialog (reference only)
CREATE OR REPLACE API INTEGRATION github_workshop_integration
API_PROVIDER = git_https_api
API_ALLOWED_PREFIXES = ('https://github.com')
API_USER_AUTHENTICATION = (TYPE = SNOWFLAKE_GITHUB_APP)
ENABLED = TRUE;
GRANT USAGE ON INTEGRATION github_workshop_integration TO ROLE ACCOUNTADMIN;API integration missing?
Usually the integration was never created in the dialog, or OAuth was not finished:
- Reopen the Git create dialog → + API Integration → paste allowed prefixes and OAuth settings → save → select it in the dropdown
- Role
ACCOUNTADMINwhen creating the integration and when opening the Git dialog - Alternative: Run all on
01_git_api_integration.sql— one Run at the cursor often executes onlyUSE ROLE ACCOUNTADMIN, notCREATE INTEGRATION SHOW INTEGRATIONS LIKE 'GITHUB%';— expectGITHUB_WORKSHOP_INTEGRATION(or the name you chose)
GitHub OAuth (snowflakedb app)
The API integration only enables OAuth — you must install/configure the snowflakedb GitHub App before Create succeeds (Workspaces + Git § OAuth2):
- OAuth2 → Sign in (GitHub login if prompted)
- Configure → Authorize Snowflake Computing (
snowflakedbapp) - Permissions: Read access to metadata + Read and write access to code
- Repository access: All repositories or Only select repositories → include your
MHPDataEngineerWorkshopfork - Save on GitHub → return to Snowsight → Create
Sign in alone is not enough — snowflakedb must have access to your fork under Repository access. Use the GitHub configuration link in the error and repeat OAuth steps 2–5, then retry Create. Git troubleshooting
Private fork: use OAuth2 (not Public repository). Public fork: Public repository works for read-only clone; push from the workspace is not supported.
OAuth blocked? Use a personal access token
- GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) →
reposcope (Databricks Git credentials) - Store token in a Snowflake secret
- In the Git dialog, choose Personal access token — Git setup (token auth)
Create — files appear under snowflake/sql/setup/, snowflake/sql/, etc. Default branch is usually main (change later: Changes → branch menu).
2. Run setup scripts from the Git workspace
Continue in Exercise: Snowflake § account setup — open each file in the synced workspace (not Codespace paste), Run all each time:
02_account_setup.sql— database, warehouse, schemas, role (setattendee_id; useCOMPUTE_WHuntilDE_WORKSHOP_WHexists — warehouse §)03_git_workshop_grants.sql— Git USAGE forDE_WORKSHOP_ROLE04_external_stage.sql— ADLS2 stage (facilitator SAS token)
Then switch to DE_WORKSHOP_ROLE + DE_WORKSHOP_WH for pipeline labs. Module 6: 05_cortex_access.sql. To run AI_COMPLETE() on a trial, add a payment method in Admin → Billing & Terms (review-only without a card is fine).
3. Pull updates after GitHub changes
- Open your Git-synced workspace (Workspaces or Projects → Workspaces)
- Changes (top of folder view) → Pull
Official references: Integrate workspaces with Git · Setting up Snowflake to use Git
Use this when the Git-synced workspace create fails — e.g. “Workspace feature disabled: Internal only system function”, an account-level gate on the internal CREATE WORKSPACE … FROM GIT DDL that is common on trial accounts. Upload Folder writes the files into your private My Workspace via the standard file-upload flow, which is not gated, so it works on every account.
There is no Pull. If the facilitator pushes a fix mid-workshop, re-upload the changed file. Fine for a one-day workshop.
| Step | What |
|---|---|
| 1 | Get the folder locally — your fork → Code → Download ZIP (or pull in Codespaces) → unzip → locate the snowflake/ folder |
| 2 | Workspaces (or Projects → Workspaces) → My Workspace |
| 3 | + Add New → Upload Folder → select snowflake/ → confirm |
| 4 | Open snowflake/sql/setup/02_account_setup.sql → Run all, then 04_external_stage.sql, then the bronze/silver/gold scripts |
Skip 01_git_api_integration.sql and 03_git_workshop_grants.sql — Git-only. .sql/.ipynb open natively; other files upload but aren’t all editable in the SQL editor (irrelevant for running labs).
Use only if Git integration or OAuth is blocked.
Skip 01 and 03. Run from Codespaces → Snowsight paste:
| Order | Script | When |
|---|---|---|
| 1 | 02_account_setup.sql |
Module 3 — set attendee_id, Run all |
| 2 | 04_external_stage.sql |
Module 3 — facilitator SAS token |
| 3 | 05_cortex_access.sql |
Module 6 (and Module 9 ML) |
| 4 | Trial payment method (optional) | Module 6 — add a card in Admin → Billing & Terms if you want to run AI_COMPLETE() on a trial; review-only is fine without one |
- Open your fork in GitHub Codespaces — Prerequisites § Working Environment
- Workspaces (or Projects → Workspaces) → + Add New → SQL File — how to run SQL
- For each lab script: open file in Codespace (e.g.
snowflake/sql/bronze/01_ingest_trips.sql) → copy → paste → Run all
Pipeline scripts (snowflake/sql/…, snowflake/snowpark/…) use the same copy-paste flow each time.
Facilitator emergency: copy SQL from Lab source files if GitHub is unavailable.
Troubleshooting
| Issue | Solution |
|---|---|
| No activation email after signup | Wait ~10 minutes; check Spam/Junk; search snowflake; new trial with different email |
| Trial expired | New trial with different email |
| LIST shows no files / stage fails | Signup must be Azure · West Europe (URL contains .west-europe.azure) — cannot change; new trial if wrong |
| Setup script stopped halfway | You likely ran one statement at the cursor — Run all or select all → Run |
| “From Git repository” missing under + Add New | Expected — the in-workspace + Add New only adds files/folders. Use the workspace-name ▾ dropdown (top-left) → Create Workspace → From Git repository |
| “Workspace feature disabled: Internal only system function” (Git workspace Create or Pull) | Account-level gate on the internal CREATE WORKSPACE … FROM GIT DDL — not fixable by config (not ENABLE_PERSONAL_DATABASE, not SYSTEM$ENABLE_PREVIEW_ACCESS), common on trial accounts. Use Upload folder (works on any account) or the copy-paste fallback. First confirm SHOW API INTEGRATIONS (need git_https_api, ENABLED = true); if the gate persists after that, switch to Upload folder |
| Git: no API integration / empty dropdown | Git dialog → + API Integration — paste settings as ACCOUNTADMIN. Alternative: Run all on 01_git_api_integration.sql |
| Git: API integration not in dropdown | API integration missing? — usually + API Integration not completed or SQL 01 not Run all |
| Git: OAuth / clone not permitted | GitHub OAuth (snowflakedb app) — install app, grant Repository access to your fork, then retry Create |
| Git: OAuth fails (other) | Re-authorize snowflakedb or use PAT — OAuth blocked? |
| Git pull conflicts | Resolve on the Changes tab or reset local changes and Pull again |
| Warehouse / role / script errors | Exercise: Snowflake § Snowsight setup · Exercise troubleshooting |