SnowDDL
  • 👋Introduction
  • ðŸšĐGetting started
  • 📋Main features
  • ðŸŠĪSnowDDL vs. Declarative DCM
  • In-depth guides
    • 👓Object identifiers
    • 📐Data types
    • ðŸ“ĶObject types
    • 🎭Role hierarchy
    • 🚧Permission model
    • ðŸ”ĶOther guides
      • Administration user
      • Integrations
      • Inbound shares
      • Object OWNERSHIP
      • Safe & unsafe DDL
      • Dependency management
      • Short hash explained
      • Env Prefix explained
      • Team workflow
      • Limitations & workarounds
      • Fivetran
      • Airbyte
      • Encrypt user passwords
      • Iceberg Tables
  • Basic usage (CLI + YAML)
    • ðŸ’ŧCLI interface
    • ðŸ“ĶYAML configs
      • ACCOUNT PARAMETER
      • ACCOUNT POLICY
      • AGGREGATION POLICY
      • ALERT
      • AUTHENTICATION POLICY
      • BUSINESS ROLE
      • DATABASE
      • DYNAMIC TABLE
      • EVENT TABLE
      • EXTERNAL ACCESS INTEGRATION
      • EXTERNAL FUNCTION
      • EXTERNAL TABLE
      • FILE FORMAT
      • FUNCTION
      • HYBRID TABLE
      • ICEBERG TABLE
      • MASKING POLICY
      • MATERIALIZED VIEW
      • NETWORK POLICY
      • NETWORK RULE
      • PERMISSION MODEL
      • PIPE
      • PLACEHOLDER
      • PROCEDURE
      • PROJECTION POLICY
      • RESOURCE MONITOR
      • ROW ACCESS POLICY
      • SCHEMA
      • SECRET
      • SEQUENCE
      • SHARE (outbound)
      • STAGE
      • STAGE FILE
      • STREAM
      • TABLE
      • TASK
      • TECHNICAL ROLE
      • USER
      • VIEW
      • WAREHOUSE
    • 🏷ïļYAML placeholders
    • 📎YAML tag !include
    • 🔐YAML tag !decrypt
  • Single DB
    • ðŸĶ€Overview
  • Advanced usage (Python)
    • ⚙ïļProgrammatic config
    • 🐍Architecture overview
      • ðŸ”ĩBlueprints
      • ðŸŸĢConfig
      • 🟠Parsers
      • ðŸŸĒResolvers
      • ðŸ”īEngine
    • 🏗ïļQuery builder & formatter
  • Breaking changes log
    • 0.45.0 - March 2025
    • 0.41.0 - January 2025
    • 0.37.0 - December 2024
    • 0.36.0 - November 2024
    • 0.33.0 - October 2024
    • 0.27.0 - May 2024
  • Links
    • GitHub repository
    • PyPI package
    • YouTube tutorials
    • Changelog
    • LinkedIn profile
Powered by GitBook
On this page
  • Components
  • Workflow
  1. Advanced usage (Python)

Architecture overview

PreviousProgrammatic configNextBlueprints

Last updated 5 months ago

Components

SnowDDL consists of the following components:

  • - pydantic model representing the desired state of an object in Snowflake account;

  • - collection of blueprints;

  • - used to parse YAML config files into blueprints, one parser class per object type;

  • - used to compare blueprints with existing metadata in Snowflake account and generate DDL commands to apply changes, one resolver class per object type;

  • - initialized with Snowflake connection and SnowDDL config, used to build, format and execute commands by resolvers.

Workflow

These components are combined into "applications" with the following workflow:

  1. Initialize an empty config.

  2. Generate individual blueprints using parsers or custom Python code, add blueprints to config.

  3. Validate config. If encountered any errors, display error messages and stop execution.

  4. Open connection to Snowflake using .

  5. Initialize engine using Snowflake connection and config.

  6. Execute resolvers to generate DDL commands. Suggest or apply DDL commands, depending on settings.

  7. Display statistics, close Snowflake connection and finish the application.

You may extend the default application to build even more sophisticated automation.

Default application used by is available on GitHub:

For example, is an extension of default application, which is available in .

🐍
Blueprint
Config
Parsers
Resolvers
Engine
Python connector
CLI interface
base.py
Single DB mode
singledb.py