Skip to main content

dbt-allure: Elevate dbt testing with intuitive Allure reports, streamlining data validation and transformation projects.

Project description

dbt-allure

Enhance your dbt testing with the dbt-allure plugin. It transforms dbt test results into detailed Allure reports, giving clear insights into your data transformations. Perfect for ensuring data integrity, this plugin makes test outcomes easy to understand and act upon. Dive deeper into testing with dbt by checking the dbt testing documentation.

For more information on Allure, visit Allure Framework. To learn more about dbt and how it works, visit the official dbt documentation.

Installation

Ensure you install the dbt-allure plugin with the same Python interpreter used by your dbt-core. The plugin can be installed via pip, poetry, or directly from a Git repository:

  • Using pip

    pip install dbt-allure
    
  • Using Poetry

    poetry add dbt-allure
    

Usage

Running dbt Commands to Generate Allure Test Results

The dbt-allure plugin can be utilized through programmatic invocations in Python or by using the provided dbt CLI wrapper.

Programmatic Invocation:

For more detailed information on programmatic invocation with dbt, refer to the dbt documentation on running dbt programmatically.

from dbt_allure import allure_callback
from dbt.cli.main import dbtRunner

dbt = dbtRunner(
  callbacks=[
    allure_callback,
  ]
)
dbt.invoke("test")

CLI Wrapper (Bash):

python -m dbt_allure test 

Generating Allure Test Reports

To visualize your test results with Allure, generate and open the Allure report:

export TEST_RESULTS_DIR=target/allure-results
export TEST_REPORT_DIR=target/allure-report
allure generate $TEST_RESULTS_DIR -o $TEST_REPORT_DIR --clean
allure open $TEST_REPORT_DIR

Plugin Configuration

The default configuration file for the plugin is .dbt_allure.yml, which can be overridden by the environment variable DBT_ALLURE_CONFIG_PATH.

Configuration options

  • results_dir_path: The path where Allure results will be stored.
  • clean_results: A boolean flag to clean results_dir_path before a run. Note: When using programmatic invocation, cleanup occurs only upon importing the callback. It's recommended to set this to False and manage cleanup manually for programmatic usage.

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

dbt_allure-0.0.1b2.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

dbt_allure-0.0.1b2-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file dbt_allure-0.0.1b2.tar.gz.

File metadata

  • Download URL: dbt_allure-0.0.1b2.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for dbt_allure-0.0.1b2.tar.gz
Algorithm Hash digest
SHA256 38bd81412c55eb3ad909b5b31a47782579f1e9df964963999b018c984dfc9516
MD5 ca29dc646784a149804b114ecaa2f864
BLAKE2b-256 a445cb3f272dcfeade7bb9d69cc4888136a965d4614ee88d4ad8e055582bf104

See more details on using hashes here.

File details

Details for the file dbt_allure-0.0.1b2-py3-none-any.whl.

File metadata

  • Download URL: dbt_allure-0.0.1b2-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for dbt_allure-0.0.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 eefad7902922c16bf73d7babad18a5d3ff16b6ad3cbbe4c0ee84a341bae46b2f
MD5 6c018f966985b053c68b824439309b4a
BLAKE2b-256 f35bc775b984506faf174c5c2fdd45761991f299b7cf6b2fb9e471e120ededc5

See more details on using hashes here.

Supported by

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