# raghul-g2002/snowflake-introduction-dev architecture

> Architecture diagram of the GitHub repository raghul-g2002/snowflake-introduction-dev, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raghul-g2002/snowflake-introduction-dev
- Repository: https://github.com/raghul-g2002/snowflake-introduction-dev

## Overview

##### Project type and purpose
- From the top-level README (“snowflake-introduction-dev”) and the directory names (introduction-m1, snowflake features-m2, snowflake-genai-m3, retrieval-augmented-generation-snowflake, cortex-analyst-with-cortex-search), this is a collection of Snowflake training/demo modules.
- Each folder corresponds to a lesson or “module” demonstrating Snowflake’s capabilities: basic ingestion and staging, SQL features, Snowpark/Python, GenAI, RAG, and Cortex integrations.

##### File structure
- introduction-m1: pure SQL scripts for database/schema creation, stages, ingestion, views.
- snowflake features-m2: SQL scripts plus Python (Snowpark) and a CLI snippet, showcasing advanced features (UDFs, RBAC, time travel, cloning, resource monitors).
- snowflake-genai-m3: SQL for Cortex LLM function + Snowpipe, Python for ML (XGBoost) and Streamlit.
- retrieval-augmented-generation-snowflake: Python Streamlit apps, SQL for RAG pipeline.
- cortex-analyst-with-cortex-search: raw_data_stage folder (CSV data), YAML config, SQL analytics and a Streamlit demo script using Cortex Search.

##### README for additional insights
- The top-level README only names the repo; sub-folders contain their own README.md (e.g., cortex-analyst-with-cortex-search/README.md) describing that demo in detail.

## Diagram (Mermaid)

```mermaid
graph TB
    classDef snowflake fill:#E0F7FA,stroke:#006064,color:#006064
    classDef table fill:#E8F5E9,stroke:#2E7D32,color:#2E7D32
    classDef external fill:#FFF3E0,stroke:#EF6C00,color:#EF6C00
    classDef app fill:#F3E5F5,stroke:#6A1B9A,color:#6A1B9A

    RawData["Raw Data CSV<br/>(S3 or Local)"]:::external

    subgraph "Snowflake Data Platform"
        SPipe["Snowpipe"]:::snowflake
        VW["Virtual Warehouse"]:::snowflake
        Stage["Stage"]:::snowflake
        subgraph "Databases & Schemas"
            RS["Raw Schema<br/>(Tables)"]:::table
            CS["Curated Schema<br/>(Tables)"]:::table
            AS["Analytics Schema"]:::table
            GS["GenAI Schema"]:::table
        end
    end

    RawData -->|"Snowpipe API"| SPipe
    SPipe --> Stage
    Stage --> RS

    RS --> TransformM1["M1: Basic Ingestion & Staging SQL"]:::snowflake
    click TransformM1 "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/introduction-m1/"
    TransformM1 --> CS

    RS --> TransformM2["M2: Advanced SQL & Snowpark"]:::snowflake
    click TransformM2 "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/snowflake features-m2/"
    TransformM2 --> CS

    CS --> SPark["Snowpark (Python)"]:::snowflake
    SPark --> MLTrain["XGBoost Model Training"]:::external
    click SPark "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/snowflake-genai-m3/"

    MLTrain --> ModelArt["Model Artifacts"]:::external

    CS --> UDF["LLM / UDF Functions"]:::snowflake
    UDF --> GS

    CS -->|"JDBC/REST"| AS

    subgraph "Presentation Layer"
        Apps["Streamlit & Demo Apps"]:::app
        GenAIApp["GenAI Streamlit UI"]:::app
        click GenAIApp "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/snowflake-genai-m3/"
        RAGApp["RAG Streamlit Chat"]:::app
        click RAGApp "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/retrieval-augmented-generation-snowflake/"
        CortexApp["Cortex Analyst Streamlit"]:::app
        click CortexApp "https://github.com/raghul-g2002/snowflake-introduction-dev/tree/main/cortex-analyst-with-cortex-search/"
    end

    AS --> Apps
    Apps --> GenAIApp
    Apps --> RAGApp
    Apps --> CortexApp

    class RawData,MLTrain,ModelArt external
    class SPipe,VW,Stage,TransformM1,TransformM2,SPark,UDF snowflake
    class RS,CS,AS,GS table
    class Apps,GenAIApp,RAGApp,CortexApp app
```
