DBT JUnit Report
This repository contains a Python script to convert dbt run results into a JUnit report format. This can be useful for integrating dbt results with CI/CD pipelines that support JUnit reports.
Installation
pip install dbt-junit-report
Usage
To convert a dbt run results JSON file to a JUnit report, run the following command:
dbt_junit_report <path-to-run_results.json> <path-to-output-junit-report.xml>
For example:
dbt_junit_report run_results.json junit_report.xml
Testing
To run the tests, use the following command:
uv run pytest
Code Overview
dbt_junit_report.py
This script contains the main functionality to convert dbt run results to a JUnit report.
convert_run_result_to_junit(result_file_path: Path, junit_file_path: Path): This function reads thedbtrun results from the specified JSON file, converts them to JUnit format, and writes the output to the specified XML file.
tests/test_dbt_junit_report.py
This file contains unit tests for the convert_run_result_to_junit function using the pytest framework.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for dbt-junit-report 1.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbt_junit_report-1.0.12.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbt_junit_report-1.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / dbt_junit_report-1.0.12.tar.gz
| Download URL | dbt_junit_report-1.0.12.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f736b257e0e6c582e26a4e993ac4b6dd8402259d8a234d08f69e058eac48ed3
|
|
BLAKE2b-256 checksum How to use checksums |
3fcc15b7aea08037571ea67bd9681d0ee3cb2a778bcfe950d0983a1bd438e63f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|
Release files / dbt_junit_report-1.0.12-py3-none-any.whl
| Download URL | dbt_junit_report-1.0.12-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4686db64f5f1171b4b22ce918e287f7275db29fd35d7d16186771a29b79f460
|
|
BLAKE2b-256 checksum How to use checksums |
538298426f046d986bca8c5a75a9694e9cb307073ab4a4bc5129fb32a13c1588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|