Skip to main content

A Dagster library for triggering Reverse ETL syncs in RudderStack.

Project description

dagster_rudderstack

A Dagster library for triggering Reverse ETL syncs in RudderStack.

Installation

Use pip to install the library.

pip install dagster_rudderstack

Configuration

Setup RudderStack resource with your workspace access token.

# resources.py
from dagster_rudderstack.resources.rudderstack import RudderStackRETLResource

rudderstack_retl_resource = RudderStackRETLResource(
            access_token="access_token")

RudderStackRETLResource exposes other configurable parameters as well. Mostly default values for them would be recommended.

  • request_max_retries: The maximum number of times requests to the RudderStack API should be retried before failng.
  • request_retry_delay: Time (in seconds) to wait between each request retry.
  • request_timeout: Time (in seconds) after which the requests to RudderStack are declared timed out.
  • poll_interval: Time (in seconds) for polling status of triggered job.
  • poll_timeout: Time (in seconds) after which the polling for a triggered job is declared timed out.

Ops and Jobs

Define ops and jobs with schedule. Provide the connection id for the sync job

# jobs.py
from dagster import job, ScheduleDefinition, ScheduleDefinition
from dagster_rudderstack.ops.retl import rudderstack_sync_op, RudderStackRETLOpConfig
from .resources import rudderstack_retl_resource

@job(
    resource_defs={
        "retl_resource": rudderstack_retl_resource
    }
)
def rs_retl_sync_job():
        rudderstack_sync_op()

rudderstack_sync_schedule = ScheduleDefinition(
    job=rs_retl_sync_job,
    cron_schedule="* * * * *",  # Runs every minute
    run_config={"ops": {"rudderstack_sync_op": RudderStackRETLOpConfig(connection_id="connection_id")}},
    default_status=DefaultScheduleStatus.RUNNING
)

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_rudderstack-1.0.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

dagster_rudderstack-1.0.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file dagster_rudderstack-1.0.0.tar.gz.

File metadata

  • Download URL: dagster_rudderstack-1.0.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for dagster_rudderstack-1.0.0.tar.gz
Algorithm Hash digest
SHA256 120e93b8b6b22812f412fc861a52a969e3211d82a1ef683606a7c5c077988907
MD5 19d942d7fa41cbaf5acd1115ea8ecfb8
BLAKE2b-256 43b0de6b4120a44785a73235830f31e895ce1b0c06624ea8a91a9428d389cb44

See more details on using hashes here.

File details

Details for the file dagster_rudderstack-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_rudderstack-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a27e1491b3cb71f417a27de11facb272ce52f457328bcfe7189cead808ee63a2
MD5 4b69e10f2391b51e3752833ee6110d6c
BLAKE2b-256 e76d5d64ac0d7b07e90f6866e58dabd2ca5aeb28c4fbdf5c3a8923b365730840

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page