How tekumara/fakesnow works
Main Components
a) Core Components:
• Connection Handler (conn.py)
• Cursor Implementation (cursor.py)
• SQL Parser & Executor (transforms.py, transforms_merge.py)
• Type System (types.py)
• Information Schema Handler (info_schema.py)
• Pandas Integration (pandas_tools.py)
b) Supporting Components:
• CLI Interface (cli.py)
• Server Implementation (server.py)
• Expression Handling (expr.py)
• Mocking System (fakes.py)
• Testing Infrastructure (fixtures.py)
┌─ Application Layer ─────────────────┐
• CLI Interface │ Testing Fixtures │
• ┴────────────────────┘
┌─ Interface Layer ──────────────────┐
• Connection Handler │
• Patching System │
• ┘
┌─ Core Processing Layer ───────────┐
• SQL Parser │ Expression Handler │
• Executor │ Type System │
• ┘
┌─ Storage Layer ──────────────────┐
• In-Memory DB │ Persistent Store │
• ┘
┌─ Integration Layer ───────────────┐
• ┘
Key Relationships
• How the patching system intercepts Snowflake connector calls
• Flow from connection → cursor → SQL processing
• Demonstrate how the mock system interfaces with different storage options
• Testing infrastructure's relationship to the core system
Implementation Details
• SQL transformation pipeline
• Connection pooling and management
• Mock database structure
• Information schema implementation