Databricks Configuration Framework
Project description
dbxconfig
Configuration framework for databricks pipelines. Define configuration and table dependencies in yaml config then get the table mappings config model:
from dbxconfig import Config, Timeslice, StageType
# build path to configuration file
pattern = "auto_load_schema"
config_path = f"./Config/{pattern}.yaml"
# create a timeslice object for slice loading. Use * for all time (supports hrs, mins, seconds and sub-second).
timeslice = Timeslice(day="*", month="*", year="*")
# parse and create a config objects
config = Config(timeslice=timeslice, config_path=config_path)
# get the configuration for a table mapping to load.
table_mapping = config.get_table_mapping(
timeslice=timeslice,
stage=StageType.raw,
table="customers"
)
Development Setup
pip install -r requirements.txt
Unit Tests
To run the unit tests with a coverage report.
pip install -e .
pytest test/unit --junitxml=junit/test-results.xml --cov=dbxconfig --cov-report=xml --cov-report=html
Build
python setup.py sdist bdist_wheel
Publish
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbxconfig-0.1.0.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for dbxconfig-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3944c56a4bfa508460171ca6297ecd6aeea7ea0795d234536c734af0c36d3be |
|
MD5 | 5e0eeaaa4b66753832ca5d409fa237ea |
|
BLAKE2b-256 | cf21f022f7b49a0d0085a03143ccb5a5e928d19766244039b98ddf0608d8df20 |