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.2.tar.gz (39.0 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.2-py3-none-any.whl (68.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: turbovault4dbt-0.2.2.tar.gz
  • Upload date:
  • Size: 39.0 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.2.tar.gz
Algorithm Hash digest
SHA256 7de78be9962920b0bd21fe7463d1b20724512e9257173a32f959e9663356e8e5
MD5 d431b242af3541159afa98da3933fc61
BLAKE2b-256 5de76085171844a25db73597d5d1b61e1bcc92f356df0222742d2d3e86c8385c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: turbovault4dbt-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8b102b60ddc80b61b4b813a694765b32bf1cf7117a583d9ae7404a54f45d66
MD5 b87cbb5e9f68fa773e73970512e33cea
BLAKE2b-256 dd8136a9cfb446ac75a44f54add8c4b7ef68a1f821ca8fbfe1887e08bb49af0d

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