Skip to main content

Dagster integration for the Rocky SQL transformation engine

Project description

dagster-rocky

Dagster integration for the Rocky SQL transformation engine.

dagster-rocky wraps the rocky CLI as a Dagster ConfigurableResource and exposes Rocky-managed tables as materializable Dagster assets — complete with check results, lineage, drift detection and quality metrics surfaced as native Dagster events.

Install

uv add dagster-rocky

You'll also need the Rocky CLI on your $PATH: https://github.com/rocky-data/rocky/releases?q=engine

Quick start (component)

Add a defs.yaml next to your other Dagster definitions:

type: dagster_rocky.RockyComponent
attributes:
  binary_path: rocky
  config_path: config/rocky.toml
  models_dir: models

Dagster's component loader will:

  1. Run rocky discover (and rocky compile, when models are present) and cache the result.
  2. Build one subset-aware multi_asset per Rocky group, with declared row_count / column_match / freshness checks per table.
  3. On materialization, shell out to rocky run --filter <key>=<value> for the selected subset and yield MaterializeResult + AssetCheckResult events with rich metadata.

Quick start (resource)

import dagster as dg
from dagster_rocky import RockyResource

rocky = RockyResource(
    binary_path="rocky",
    config_path="config/rocky.toml",
    timeout_seconds=3600,
)

defs = dg.Definitions(resources={"rocky": rocky})

Then in an asset:

@dg.asset
def acme_orders(rocky: RockyResource) -> dg.MaterializeResult:
    result = rocky.run(filter="tenant=acme")
    return dg.MaterializeResult(
        metadata={"tables_copied": result.tables_copied, "duration_ms": result.duration_ms},
    )

Public API

Symbol Purpose
RockyResource ConfigurableResource wrapping the Rocky CLI
RockyComponent State-backed Dagster component that loads Rocky tables as assets
RockyDagsterTranslator Subclass to customize asset key / group / tag mapping
RockyMetadataSet Namespaced metadata (source_id, strategy, watermark, …)
load_rocky_assets() Functional helper that returns AssetSpec for each Rocky table
emit_materializations() / emit_check_results() Convert a RunResult into Dagster events
check_metadata() Build a metadata mapping for a single Rocky CheckResult
cost_metadata_from_optimize() Extract per-model cost recommendations from OptimizeResult
parse_rocky_output() Auto-detect a Rocky JSON payload and return the matching Pydantic model

Documentation

Related projects

License

Apache 2.0

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_rocky-1.27.0.tar.gz (358.5 kB view details)

Uploaded Source

Built Distribution

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

dagster_rocky-1.27.0-py3-none-any.whl (208.3 kB view details)

Uploaded Python 3

File details

Details for the file dagster_rocky-1.27.0.tar.gz.

File metadata

  • Download URL: dagster_rocky-1.27.0.tar.gz
  • Upload date:
  • Size: 358.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for dagster_rocky-1.27.0.tar.gz
Algorithm Hash digest
SHA256 e2a05deb83f2e15e9543d2e9b9f780295d20db6a7f6645503615c16c607ac601
MD5 cc0a2fe413d7802f9e4a62c86966e407
BLAKE2b-256 6be2d134721406d854fbcd0db6903b001cf44665ed15e1a9f6e4c37f515ff2b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for dagster_rocky-1.27.0.tar.gz:

Publisher: dagster-release.yml on rocky-data/rocky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dagster_rocky-1.27.0-py3-none-any.whl.

File metadata

  • Download URL: dagster_rocky-1.27.0-py3-none-any.whl
  • Upload date:
  • Size: 208.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for dagster_rocky-1.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cac2e12d47b21fb40f0f77c48ae6aa55cafb7b26ab70ea4bd04dc3718b00548
MD5 6292c0f4f46cafb2089e67fef7d8997b
BLAKE2b-256 ed759afa5506f6da37305a628c30117ef051f099121eb5baea17a591e5439e08

See more details on using hashes here.

Provenance

The following attestation bundles were made for dagster_rocky-1.27.0-py3-none-any.whl:

Publisher: dagster-release.yml on rocky-data/rocky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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