Config
Last updated
Last updated
Config is a collection of blueprints.
Config is represented by class SnowDDLConfig
, which is located in .
__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.
.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.