Skip to main content

Public API spine for reverse ETL authoring.

Project description

condor-retl

Sync warehouse data to downstream partners from plain Python.

Quick Start

Install the core library with a source backend and destination connector:

pip install "condor-retl[duckdb]" condor-retl-meta

Declare the rows to send and run the sync:

import retl
from retl.backends.duckdb import DuckDBSqlBackend


db = DuckDBSqlBackend(
    database="warehouse.duckdb",
    source_schema="main",
    runtime_schema="retl",
)

newsletter_audience = retl.state(
    name="newsletter_audience",
    source=retl.source(
        name="newsletter_customers",
        mode="snapshot",
        backend=db.source_backend(),
        query="""
        select customer_id, email
        from customers
        where email is not null
        """,
    ),
    key={"customer_id": "customer_id"},
    identifiers=[{"type": "email", "value": "email"}],
    target=retl.target("newsletter_customers"),
)

meta = retl.destinations.load(
    "retl/meta",
    binding_name="meta_primary",
    credential_namespace="destinations.meta",
    config_namespace="destinations.meta",
)

result = retl.runner(
    name="newsletter_to_meta",
    runtime_store=db.runtime_store(),
).run(
    retl.sync(
        name="newsletter_to_meta",
        declaration=newsletter_audience,
        destination=meta,
        surface="custom_audiences",
    ),
    dry_run=True,
)

print(result.to_text())

Change dry_run=True to dry_run=False when the plan looks right.

Use a different source backend or partner connector when you need one:

pip install "condor-retl[snowflake]"
pip install "condor-retl[bigquery]"
pip install "condor-retl[databricks]"
pip install "condor-retl[postgresql]"

pip install condor-retl-klaviyo
pip install condor-retl-google-ads-data-manager
pip install condor-retl-bing-ads
pip install condor-retl-tiktok-ads

The distribution is condor-retl; the Python package is retl.

Configuration

By default, RETL reads config and secrets from environment variables. The Meta example above expects:

export DESTINATIONS__META__ACCESS_TOKEN="..."
export DESTINATIONS__META__AD_ACCOUNT_ID="act_..."

What You Declare

  • source: the SQL rows to read
  • state: current facts, such as audience membership or profile attributes
  • event: occurred facts, such as purchases or signups
  • sync: one state or event declaration bound to one partner surface
  • destination: the partner connector and account configuration

RETL runs syncs through durable collect -> stage -> reconcile -> sync phases, so dry runs, retries, and operator evidence use the same declarations as production sends.

Partners

First-party connector packages currently cover:

Package Connector ref
condor-retl-meta retl/meta
condor-retl-klaviyo retl/klaviyo
condor-retl-google-ads-data-manager retl/google-ads-data-manager
condor-retl-bing-ads retl/bing-ads
condor-retl-tiktok-ads retl/tiktok-ads

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

condor_retl-0.1.1.tar.gz (220.7 kB view details)

Uploaded Source

Built Distribution

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

condor_retl-0.1.1-py3-none-any.whl (297.4 kB view details)

Uploaded Python 3

File details

Details for the file condor_retl-0.1.1.tar.gz.

File metadata

  • Download URL: condor_retl-0.1.1.tar.gz
  • Upload date:
  • Size: 220.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for condor_retl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a1fdbfd0dd0c7fcad5f650584c470de2c3463e0f866d623c868c04ea14fcfee7
MD5 051bbda163aa52d5789f411c6e23d6dc
BLAKE2b-256 d08b72df91b97a1abed05464a56b2f5abe82671857fb88c925ab0d44d9cf8532

See more details on using hashes here.

Provenance

The following attestation bundles were made for condor_retl-0.1.1.tar.gz:

Publisher: publish.yml on condorgraph/condor-retl

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

File details

Details for the file condor_retl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: condor_retl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 297.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for condor_retl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39082c03defd5be657af340f6cd310b172657d0979b08808e3b2bf684aa94547
MD5 7e6c2461cb82329fefad89ca36e2950f
BLAKE2b-256 0c0a8727b30a24fe9df8911fcedc1bd7c10e6e76049258c14b35ee79805fabb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for condor_retl-0.1.1-py3-none-any.whl:

Publisher: publish.yml on condorgraph/condor-retl

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