Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

workstream-dbt-core

A CLI and Python library for integrating dbt-core and Workstream.

Installation

pip install workstream-dbt-core

Usage

Installing this package installs a CLI app. You can learn about its commands and options using:

workstream --help

Reporting a dbt Invocation

Report a dbt-core invocation to Workstream by posting artifacts from dbt's target directory to the Workstream API. The CLI defaults to searching for a directory named target in the current working directory, but this is configurable with the --target-path or -t option.

workstream report -t /path/to/dbt/target --client-id abc123 --client-secret xyz987

Exit Codes

By default, workstream report will always exit with a 0 code, even if it encounters critical errors, so that it doesn't interrupt later steps in your pipeline.

However, if you rely on dbt failures to cause workflow failures, this may not work for you. If you would like workstream report to exit with a nonzero code when dbt runs, tests, or sources fail, you can run it with the --exit-nonzero option:

dbt test || true
workstream report --exit-nonzero

Environment Variables

All CLI options can also be set using environment variables. Vars start with the prefix WORKSTREAM_DBT_ and then share their name with their associated option. The following command is equivalent to the previous one:

WORKSTREAM_DBT_TARGET_PATH="/path/to/dbt/target" WORKSTREAM_DBT_CLIENT_ID="abc123" WORKSTREAM_DBT_CLIENT_SECRET="xyz987" workstream report

Contributing

This project is built with Poetry. After cloning, install with:

poetry install

Then spawn a subshell with a virtual environment activated:

poetry shell

Testing and Linting

This project uses pytest and ruff. With poetry shell activated, run tests with:

pytest

Format and lint with:

ruff format
ruff . --fix

or if you have make, lint and test with:

make

Release files for workstream-dbt-core 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workstream-dbt-core 0.2.0
File Size Uploaded
workstream_dbt_core-0.2.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for workstream-dbt-core 0.2.0
File Interpreter ABI Platform
workstream_dbt_core-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / workstream_dbt_core-0.2.0.tar.gz

Download URL workstream_dbt_core-0.2.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
66237b8c71d1df648a4d68911cae5c23e9e9ea01a93cc0194b52bd4a73a0bbee
BLAKE2b-256 checksum
How to use checksums
57bc59819f202caeba5599da370c47f0c6cb0f2156c875c97f8d8438d55c4bb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Linux/6.5.0-1015-azure

Release files / workstream_dbt_core-0.2.0-py3-none-any.whl

Download URL workstream_dbt_core-0.2.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4d3f52465c5ebd18abce39dd8dcaa0e0b5ccbdeb9e22e01b6e141da52c0bf3a
BLAKE2b-256 checksum
How to use checksums
62a8d46265a631e8cf63fe3664ab90676ce3093d7d88722be37599ccb2ac7eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Linux/6.5.0-1015-azure

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page