dbt-4ps-generator
CLI that generates dbt staging models from a bc2adls CDM export. For every entity in the manifest it writes:
stg_4ps__<table>.sql— aSELECT ... FROM STREAM READ_FILES(...)model with the column types from the CDM metadata and columns renamed to snake_case (CreditLimitLCY-20→credit_limit_lcy)_4ps__models.yaml— model + column descriptions, and adbt_utils.unique_combination_of_columnstest on each table's primary key
Full documentation: https://misja-pronk.github.io/dbt-4ps-staging/
Install
uvx dbt-4ps-generator --help # run once, ephemerally
uv tool install dbt-4ps-generator # install the command on PATH
Or from a checkout: uv run dbt-4ps-generator in this directory.
Usage
Download the CDM metadata from the Unity Catalog volume bc2adls exports to (authenticates via DATABRICKS_HOST/DATABRICKS_TOKEN or a ~/.databrickscfg profile):
dbt-4ps-generator download \
--volume-path /Volumes/<catalog>/<schema>/<volume> \
--output-directory ../_cdm
Generate the models:
dbt-4ps-generator generate \
--manifest ../_cdm/deltas.manifest.cdm.json \
--output-directory ../dbt_4ps_staging_package/models/staging/4ps
Options (see --help): --model-prefix (default stg_4ps__), --schema-prefix (default _4ps__), and --no-file-metadata-column to omit the _metadata source-file column.
Development
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run ty check
Layout
File (src/dbt_4ps_generator/) |
Purpose |
|---|---|
cli.py |
Typer CLI (generate, download) |
cdm.py |
Pydantic models for the CDM manifest and entity files |
converters.py |
CDM → dbt/SQL conversions (types, names, READ_FILES options) |
dbt.py |
Builders that write the .sql models and schema yaml |
sql.py |
SQL primitives (columns, options, streaming-table DDL builder) |
databricks_helper.py |
Volume download via the Databricks SDK |
Metadata
Release files for dbt-4ps-generator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbt_4ps_generator-0.1.1.tar.gz | 57.9 kB | Without provenance | Details for dbt_4ps_generator-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_4ps_generator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dbt_4ps_generator-0.1.1-py3-none-any.whl |
Total release size: 70.1 kB
Release files / dbt_4ps_generator-0.1.1.tar.gz
| Download URL | dbt_4ps_generator-0.1.1.tar.gz |
|---|---|
| Size | 57.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4daf6a5d5afcc96befcd4816d015dea9c195dbb636ed4cf02819d882d5cf5f7a
|
|
BLAKE2b-256 checksum How to use checksums |
a1252615857e3a84d162d646e7973ad3bec50419edca2311fa455b1e422b59d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dbt_4ps_generator-0.1.1-py3-none-any.whl
| Download URL | dbt_4ps_generator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e31ea50eb076bf5f714fbe597409bb9a705b15eb401f69941bc8b32e51109eb
|
|
BLAKE2b-256 checksum How to use checksums |
8fc652f2c4ae1d791191ecd71c4296b5bcf3b8b3d6dd0ffd1fde632e4ce2c823
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dbt-4ps-generator 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.