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
  • Methods
  • Properties
  1. Advanced usage (Python)
  2. Architecture overview

Config

PreviousBlueprintsNextParsers

Last updated 5 months ago

Config is a collection of blueprints.

Config is represented by class SnowDDLConfig, which is located in .

Methods

  • __init__(env_prefix=None) Initialize config with optional , which should be applied to all blueprints.

  • get_blueprints_by_type(cls: Type[T_Blueprint]) -> Dict[str,T_Blueprint] Accepts blueprint type (class). Returns all blueprints of this type.

  • get_blueprints_by_type_and_pattern(cls: Type[T_Blueprint], pattern: IdentPattern) -> Dict[str,T_Blueprint]) Accepts blueprint type (class) and . Returns all blueprints of this type with full names matching pattern. Example of pattern: db1.sc1.my_tables_*

  • add_blueprint(bp: AbstractBlueprint) Accept instance of blueprint. Add this blueprint to collection. If blueprint of this type with the same full_name already exists, it will be replaced.

  • remove_blueprint(bp: AbstractBlueprint) Accepts instance of blueprint. Removes this blueprint from collection. Throws ValueError exception if blueprint does not exist in config.

Properties

  • .env_prefix (str) - normalized , upper cased and with __ at the end. It should be used to build object identifiers.

  • .blueprints (dict) - blueprints in collection.

    • {key} (type) - blueprint type (class).

    • {value} (dict)

      • {key} (str) - full name of object, stored as string.

      • {value} (blueprint) - blueprint dataclass object.

  • .placeholders (dict) - used by parsers during processing of YAML configs.

    • {key} (str) - name of placeholder.

    • {value} (bool, float, int, str) - value of placeholder.

🐍
🟣
config.py
env prefix
Unix-style pattern
env prefix
placeholders