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.5.tar.gz (43.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.5-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: turbovault4dbt-0.2.5.tar.gz
  • Upload date:
  • Size: 43.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.5.tar.gz
Algorithm Hash digest
SHA256 2f7d5c37b05a6e688ecd041e04091f884edf14c6430c82e9b300f0cc56b2c2a0
MD5 a38da42f9b1c94c4ce2d1d1421cf2b1b
BLAKE2b-256 886fac9a26fb3b0e740a5fc5e46b82e17078d93f33a40f1e464afffdb90948a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: turbovault4dbt-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 72.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 341e635854414ee69d891b8184615102234be834dde4e40bf524567b84192a32
MD5 72ea3f6e06bc2b75822d351412bccd9d
BLAKE2b-256 f34c8a557670412eb25d637780474105f9175e7762a2d94c2a921946dff3905c

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