Skip to main content

Dagster integration for Turbine data quality checks

Project description

dagster-turbine

Dagster integration for Turbine. Surfaces every Check Definition the Turbine server knows about as a native Dagster AssetCheckSpec, executes each one against the running Turbine HTTP API, and publishes the same authenticated TurbineClient as a Dagster resource for your own assets.

Two entry points ship in the package:

  • TurbineChecksComponent — declarative Component; configure once in YAML, get asset checks for free.
  • TurbineServerResource — injectable resource for custom assets/checks that want to call Turbine directly.

Install

uv add dagster-turbine

Python 3.12 or newer. Pulls only dagster and turbine-client — the Turbine engine never enters your Dagster environment.

Minimal YAML (declarative)

# defs/quality/defs.yaml
type: dagster_turbine.TurbineChecksComponent
attributes:
  base_url: http://turbine:8000
  auth: { type: bearer, token: ${TURBINE_TOKEN} }

Reload your code location and every contract on the server appears as a multi_asset_check per table, one AssetCheckSpec per registered Turbine check.

Contract Selection

Narrow the discovery to a subset of contracts. Omit contracts (or set it to null) to cover every contract — the zero-config default.

type: dagster_turbine.TurbineChecksComponent
attributes:
  base_url: http://turbine:8000
  contracts: [orders, customers]
  auth: { type: bearer, token: ${TURBINE_TOKEN} }

Run options

type: dagster_turbine.TurbineChecksComponent
attributes:
  base_url: http://turbine:8000
  run:
    incremental: false   # rows newer than the last watermark; mutually exclusive with partition windows
    flag_rows: true      # persist failing-row PKs to the flag matrix

Partitioned assets automatically forward their partition window as the Check Window's since / until. Combining a partitioned asset with incremental: true is rejected at execute time — pick the data interval or the watermark.

Blocking (severity-driven)

Each generated AssetCheckSpec.blocking defaults to whether the underlying Check Definition's severity is error (the gating default). Advisory checks (severity: warn, authored in the Quality Spec) become non-blocking automatically.

Override per dimension when the topology demands it:

type: dagster_turbine.TurbineChecksComponent
attributes:
  base_url: http://turbine:8000
  blocking_dimensions: [validity]   # any check in this dimension blocks regardless of severity

Auth

Three modes, picked via the auth discriminator:

auth: { type: none }                                # in-cluster, unauthenticated
auth: { type: bearer, token: ${TURBINE_TOKEN} }     # static bearer token
auth:
  type: azure_ad                                    # OAuth client-credentials behind PAX
  tenant_id: ${AZ_TENANT_ID}
  client_id: ${AZ_CLIENT_ID}
  client_secret: ${AZ_CLIENT_SECRET}
  scope: api://turbine/.default

TurbineServerResource

Inject the same configured TurbineClient into your own assets:

import dagster as dg
from dagster_turbine import TurbineServerResource, BearerAuthConfig

@dg.asset
def turbine_contracts(turbine: TurbineServerResource):
    return turbine.get_client().list_contracts()

defs = dg.Definitions(
    assets=[turbine_contracts],
    resources={
        "turbine": TurbineServerResource(
            base_url="http://turbine:8000",
            auth=BearerAuthConfig(token="..."),
        ),
    },
)

Compatibility

dagster-turbine >= 0.5.12 requires turbine-data >= 0.5.12 on the server.

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

dagster_turbine-0.5.12.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_turbine-0.5.12-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file dagster_turbine-0.5.12.tar.gz.

File metadata

  • Download URL: dagster_turbine-0.5.12.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dagster_turbine-0.5.12.tar.gz
Algorithm Hash digest
SHA256 debdfdaae2d04a43229dec87823e81b1f8aced9a9c9c5ebabd2e6335313b1e48
MD5 ab32490d0334118cc375f1cc22512de4
BLAKE2b-256 12d13daf69c1aa7d97770c1a4ef3871e3cb65665e991a087f9e340cd93441573

See more details on using hashes here.

File details

Details for the file dagster_turbine-0.5.12-py3-none-any.whl.

File metadata

  • Download URL: dagster_turbine-0.5.12-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dagster_turbine-0.5.12-py3-none-any.whl
Algorithm Hash digest
SHA256 59476d3ec535e12de33b706f828928571dc919b1e1e911d6fc18cb3b256f93d6
MD5 de24e7c14b8222aa03a61c281b46f817
BLAKE2b-256 ca84e7a90f224e8a2c49b899fba109146e60170f695ad988e16de8401ee2303c

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