Skip to main content

CLI for Turbovault 4 DBT

Project description

TurboVault4dbt_cli

TurboVault4dbt Banner


What is TurboVault4dbt_cli?

TurboVault4dbt_cli is an open-source CLI tool that automatically generates dbt models according to datavault4dbt templates. It uses a metadata input of your Data Vault 2.0 from one of the supported databases and creates ready-to-process dbt-models.


Prerequisites


Supported Metadata Sources

  • Snowflake
  • BigQuery
  • Google Sheets
  • Excel
  • SQLite DB Files

How does my metadata needs to look like?

Your metadata needs to be stored in the following tables/worksheets:


Installation (CLI Version)

  1. Clone this repository:
    git clone https://github.com/ScalefreeCOM/turbovault4dbt.git
    cd turbovault4dbt
    
  2. (Recommended) Create and activate a virtual environment:
    python3 -m venv turbovault-env
    source turbovault-env/bin/activate
    
  3. Install in editable mode:
    pip install -e .
    

Quickstart: Using the CLI

1. Prepare your metadata

  • See metadata_ddl/ for DDL scripts and Excel templates.
  • Configure your metadata connection in src/turbovault4dbt/backend/config/config.ini.

2. Run TurboVault4dbt_cli

Basic usage:

# List available nodes from your metadata Excel file
$ turbovault list --file path/to/your.xlsx

# Generate dbt models for selected nodes
$ turbovault run --file path/to/your.xlsx -s hub1

# Use selectors (e.g., +node, node+, @node)
$ turbovault run --file path/to/your.xlsx -s '+sat1 hub2+ @masat3'

# Specify output directory
$ turbovault run --file path/to/your.xlsx --output-dir my_output_dir -s hub1

Command reference:

  • turbovault run --file <input.xlsx> [-s <selector>] [--output-dir <dir>]
    Generate dbt models for selected nodes.
  • turbovault list --file <input.xlsx> [-s <selector>]
    List resolved nodes for a selector (dry run).

Selector syntax:

  • A+ — node A and all descendants
  • +A — node A and all ancestors
  • @A — node A, all ancestors, and all descendants
  • Multiple selectors can be space-separated

Regression Testing

To run the regression test suite:

pip install -r requirements-test.txt
pytest tests/test_regression.py
  • Add new test cases by creating folders in tests/ with input.xlsx and expected_output/.
  • Negative test cases (expected failures) are also supported.

Project Structure

  • src/turbovault4dbt/ — all source code
  • tests/ — regression test cases
  • pyproject.toml, requirements.txt, etc. — project config in root

Releases

See GitHub Releases


License

See LICENSE


Need Help?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turbovault4dbt-0.2.3.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turbovault4dbt-0.2.3-py3-none-any.whl (68.2 kB view details)

Uploaded Python 3

File details

Details for the file turbovault4dbt-0.2.3.tar.gz.

File metadata

  • Download URL: turbovault4dbt-0.2.3.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for turbovault4dbt-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8fa2138587bea20b1f5a40085504650366d0706cef7c1569e8afa21b988964d4
MD5 eb0d14374666299d0310130463c6f071
BLAKE2b-256 1b8d091d90918ec89fd3999c7ca5487f5e7ed1500bf0d3b7fb9912786c9914a2

See more details on using hashes here.

File details

Details for the file turbovault4dbt-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: turbovault4dbt-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 68.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for turbovault4dbt-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d4a2b0ab48e6e1e6199489ea1666c66b69cca8f3a555c84ba2ecd418cad00de7
MD5 c6f2d043b8cd1130517d1bee6dd8451c
BLAKE2b-256 41f2c27dd3c1d11f8a010dceeb4fb5b5028425987cf89d8291ae3c3eeacae31a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page