RepoSnowflake (Arctic)Snowflake (Arctic)published Aug 4, 2021seen 5d

Snowflake-Labs/sf-samples

Open original ↗

Captured source

source ↗
published Aug 4, 2021seen 5dcaptured 8hhttp 200method plain

Snowflake-Labs/sf-samples

Description: Sample files, code snippets and downloads for Snowflake labs and tutorials.

License: Apache-2.0

Stars: 273

Forks: 314

Open issues: 46

Created: 2021-08-04T15:04:56Z

Pushed: 2026-06-10T01:04:14Z

Default branch: main

Fork: no

Archived: no

README:

Snowflake Samples

Working examples for every corner of the Snowflake platform — SQL snippets, Python apps, full-stack demos, quickstart companions, dbt projects, Native Apps, Cortex agents, and everything in between. Built by the community, maintained in the open.

55+ samples across AI, data engineering, Snowpark, Streamlit, Iceberg, ML, SPCS, geospatial, and more. Each one lives in its own directory under [samples/](samples/) with a README explaining how to run it.

> Many of these samples are companion code for quickstarts, blog posts, and conference talks.

Looking for something specific?

Some product areas have their own dedicated repos with more focused, maintained collections:

| If you're looking for... | Go here | |--------------------------|---------| | Snowflake Notebooks (demos, tutorials, data science) | snowflake-demo-notebooks | | Cortex AI Toolkit (agents, RAG, search, fine-tuning, AI playground) | Snowflake-AI-Toolkit | | Streamlit in Snowflake (app patterns, deployment, components) | snowflake-demo-streamlit | | SPCS templates (container service blueprints) | spcs-templates | | Quickstart guides (step-by-step walkthroughs) | sfquickstarts | | Emerging Solutions Toolbox (SIT team frameworks and accelerators) | emerging-solutions-toolbox |

If it doesn't fit neatly into one of those — or crosses multiple areas — this repo is the right home.

---

What's Inside

Cortex AI and LLM

| Sample | Description | |--------|-------------| | [aisql](samples/aisql) | AISQL use cases across marketing, e-commerce, healthcare, finance with Cortex AI functions | | [cortex-analyst](samples/cortex-analyst) | Industry-specific Cortex Analyst semantic model templates | | [cortex_analyst_native_app](samples/cortex_analyst_native_app) | Native App for natural language querying of Marketplace data via Cortex Analyst | | [cortex_analyst_salesforce_salescloud_template](samples/cortex_analyst_salesforce_salescloud_template) | Semantic YAML templates for querying Salesforce Sales Cloud data | | [cortex_ai_agents_local_streamlit](samples/cortex_ai_agents_local_streamlit) | Cortex Agents demo analyzing sales conversations with Cortex Search and Analyst | | [cortex-nemoguardrails](samples/cortex-nemoguardrails) | NeMo Guardrails integration with Cortex LLMs on SPCS | | [snowfake-cortex](samples/snowfake-cortex) | Snippets and scripts for Snowflake Cortex functions | | [operation_cortex](samples/operation_cortex) | Spy Agency data scavenger hunt demo with Cortex Analyst and Streamlit | | [sow_llm](samples/sow_llm) | Open-source LLMs (FLAN-T5) on Snowpark Optimized Warehouses via UDFs |

Agentic AI

| Sample | Description | |--------|-------------| | [cloudflare-r2-logpush-agent](samples/cloudflare-r2-logpush-agent) | Cloudflare HTTP log pipeline from R2 into Snowflake with a natural-language Cortex Agent | | [create_ai_agents_on_snowflake_with_lang_ai](samples/create_ai_agents_on_snowflake_with_lang_ai) | Retention AI Agent using Lang.ai's Native App | | [vehicle-insurance-agentic-ai](samples/vehicle-insurance-agentic-ai) | End-to-end agentic insurance claim processor using Cortex Document AI and LangGraph |

RAG and Document Intelligence

| Sample | Description | |--------|-------------| | [RAG-to-Rich-Apps](samples/RAG-to-Rich-Apps) | RAG pipeline with Cortex: upload PDFs, query via notebook and Streamlit | | [pdf-analysis](samples/pdf-analysis) | SQL-based PDF parsing pipeline using stages, streams, tasks, and a parse UDF | | [govern-your-lakehouse-for-ai-vhol](samples/govern-your-lakehouse-for-ai-vhol) | Hands-on lab: Iceberg + governance + data quality DMFs + Cortex Agent |

ML and Data Science

| Sample | Description | |--------|-------------| | [ml](samples/ml) | Comprehensive ML samples: feature store, model registry, ML jobs, HPO, distributed training | | [custom_ml_pipelines](samples/custom_ml_pipelines) | Scikit-learn custom preprocessing with Snowflake Model Registry | | [ML Powered Functions](samples/ML%20Powered%20Functions) | Built-in ML functions: anomaly detection, forecasting, contribution explorer | | [energy-price-forecasting-native-app](samples/energy-price-forecasting-native-app) | Time-series electricity price forecasting with Native App deployment | | [Sagemaker-to-Snowflake](samples/Sagemaker-to-Snowflake) | XGBoost, PyTorch, image classification migration from SageMaker to Snowflake ML | | [Distributed Training with Ray and AutoGluon](samples/Distributed%20Training%20with%20Ray%20and%20AutoGluon) | Distributed ML training with Ray and AutoGluon on Snowflake notebooks | | [leveraging_kumo_for_smarter_recommendations](samples/leveraging_kumo_for_smarter_recommendations) | Product recommendations for high-LTV customers using Kumo's Native App | | [prescriptive-maintenance-demo](samples/prescriptive-maintenance-demo) | Prescriptive maintenance with scikit-learn and Snowpark | | [multimodal-process-analytics](samples/multimodal-process-analytics) | Multimodal process analytics notebook using ML |

Snowpark

| Sample | Description | |--------|-------------| | [snowpark-pandas](samples/snowpark-pandas) | Snowpark pandas API (Modin) for running pandas natively on Snowflake | | [snowpark_connect](samples/snowpark_connect) | Snowpark Connect for migrating and running Spark workloads on Snowflake | | [vectorized_udtfs](samples/vectorized_udtfs) | Vectorized UDTFs for high-performance time-series processing | | [rdkit](samples/rdkit) | Cheminformatics with RDKit and Snowpark Python |

Streamlit

| Sample | Description | |--------|-------------| | [streamlit-in-snowflake](samples/streamlit-in-snowflake) | Patterns collection: multi-page apps, role-based pages, deployment, telemetry | |…

Excerpt shown — open the source for the full document.