Community-maintained Dagster integration for drt (data reverse tool)
Project description
dagster-drt
Community-maintained Dagster integration for drt (data reverse tool).
Expose drt syncs as Dagster assets with full observability — metrics, dependencies, and dry-run support.
Installation
pip install dagster-drt
Quick Start
from dagster import Definitions
from dagster_drt import drt_assets
defs = Definitions(assets=drt_assets(project_dir="path/to/drt-project"))
Features
DagsterDrtTranslator
Customise how drt syncs map to Dagster assets. Subclass and override methods:
from dagster import AssetKey
from dagster_drt import DagsterDrtTranslator, drt_assets
class MyTranslator(DagsterDrtTranslator):
def get_group_name(self, sync_config):
return "reverse_etl"
def get_deps(self, sync_config):
deps_map = {
"trigger_bq_meeting_gha": [AssetKey("bq_meeting_cloudsql")],
}
return deps_map.get(sync_config.name, [])
assets = drt_assets(
project_dir="pipeline/data-reverse",
dagster_drt_translator=MyTranslator(),
)
Available methods:
| Method | Default | Purpose |
|---|---|---|
get_asset_key(sync_config) |
AssetKey(f"drt_{name}") |
Asset key |
get_group_name(sync_config) |
None |
Group name |
get_description(sync_config) |
sync_config.description |
Asset description |
get_deps(sync_config) |
[] |
Upstream dependencies |
get_metadata(sync_config) |
{} |
Static metadata |
Dry-Run Support (DrtConfig)
Control dry-run mode per-run from the Dagster UI, or set a build-time default:
# Build-time default: all syncs in dry-run mode
assets = drt_assets(project_dir="...", dry_run=True)
# Override per-run via Dagster UI → Run Config:
# ops:
# drt_my_sync:
# config:
# dry_run: false
MaterializeResult
Assets return MaterializeResult with structured metadata visible in the Dagster UI:
sync_name— sync identifierrows_synced— successful row countrows_failed— failed row countrows_skipped— skipped row countdry_run— whether dry-run was activerow_errors_count— number of row-level errors (details in logs)
Filtering Syncs
# Only expose specific syncs as assets
assets = drt_assets(
project_dir="...",
sync_names=["sync_a", "sync_b"],
)
Usage with dagster-dbt
from dagster import Definitions
from dagster_dbt import dbt_assets
from dagster_drt import drt_assets, DagsterDrtTranslator
defs = Definitions(
assets=[*my_dbt_assets, *drt_assets("path/to/drt-project")],
)
API Reference
drt_assets()
| Parameter | Type | Default | Description |
|---|---|---|---|
project_dir |
str | Path |
required | Path to drt project root |
sync_names |
list[str] | None |
None |
Filter to specific syncs |
dagster_drt_translator |
DagsterDrtTranslator | None |
None |
Custom translator |
dry_run |
bool |
False |
Default dry-run mode |
Returns: list[AssetsDefinition]
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dagster_drt-0.1.0.tar.gz.
File metadata
- Download URL: dagster_drt-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229f12dff4da5e2fc6f9a658271cab01890b8c9f61819cc14fa8b93ec1c2a4b2
|
|
| MD5 |
9730f7fbda37034d02264123ae38a1d4
|
|
| BLAKE2b-256 |
6eb56efdb5b1f9783482e537a05fde28b049a739467c35a4326daf6a29061bcf
|
Provenance
The following attestation bundles were made for dagster_drt-0.1.0.tar.gz:
Publisher:
publish-dagster-drt.yml on drt-hub/drt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dagster_drt-0.1.0.tar.gz -
Subject digest:
229f12dff4da5e2fc6f9a658271cab01890b8c9f61819cc14fa8b93ec1c2a4b2 - Sigstore transparency entry: 1205368506
- Sigstore integration time:
-
Permalink:
drt-hub/drt@f230d9ffaaf67a93a7e4994296bf4bbe90d98d8b -
Branch / Tag:
refs/tags/dagster-drt-v0.1.0 - Owner: https://github.com/drt-hub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-dagster-drt.yml@f230d9ffaaf67a93a7e4994296bf4bbe90d98d8b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dagster_drt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dagster_drt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c011ce991c71dbac61866cca671571c5f7f29ff7d9b3152864fdfbe46f11a8fd
|
|
| MD5 |
79ca6df7bef760d275963a5fb6c75472
|
|
| BLAKE2b-256 |
36d753edc7deb612e62a101fbec402ff60ca5059047930f3f9ad8540b0a609c4
|
Provenance
The following attestation bundles were made for dagster_drt-0.1.0-py3-none-any.whl:
Publisher:
publish-dagster-drt.yml on drt-hub/drt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dagster_drt-0.1.0-py3-none-any.whl -
Subject digest:
c011ce991c71dbac61866cca671571c5f7f29ff7d9b3152864fdfbe46f11a8fd - Sigstore transparency entry: 1205368783
- Sigstore integration time:
-
Permalink:
drt-hub/drt@f230d9ffaaf67a93a7e4994296bf4bbe90d98d8b -
Branch / Tag:
refs/tags/dagster-drt-v0.1.0 - Owner: https://github.com/drt-hub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-dagster-drt.yml@f230d9ffaaf67a93a7e4994296bf4bbe90d98d8b -
Trigger Event:
push
-
Statement type: