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 readstate: current facts, such as audience membership or profile attributesevent: occurred facts, such as purchases or signupssync: one state or event declaration bound to one partner surfacedestination: 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1fdbfd0dd0c7fcad5f650584c470de2c3463e0f866d623c868c04ea14fcfee7
|
|
| MD5 |
051bbda163aa52d5789f411c6e23d6dc
|
|
| BLAKE2b-256 |
d08b72df91b97a1abed05464a56b2f5abe82671857fb88c925ab0d44d9cf8532
|
Provenance
The following attestation bundles were made for condor_retl-0.1.1.tar.gz:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl-0.1.1.tar.gz -
Subject digest:
a1fdbfd0dd0c7fcad5f650584c470de2c3463e0f866d623c868c04ea14fcfee7 - Sigstore transparency entry: 1570796487
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@189d23c8cf72a88ebeaebe50c78a789b84f838b7 -
Branch / Tag:
refs/tags/condor-retl/v0.1.1 - Owner: https://github.com/condorgraph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@189d23c8cf72a88ebeaebe50c78a789b84f838b7 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39082c03defd5be657af340f6cd310b172657d0979b08808e3b2bf684aa94547
|
|
| MD5 |
7e6c2461cb82329fefad89ca36e2950f
|
|
| BLAKE2b-256 |
0c0a8727b30a24fe9df8911fcedc1bd7c10e6e76049258c14b35ee79805fabb7
|
Provenance
The following attestation bundles were made for condor_retl-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl-0.1.1-py3-none-any.whl -
Subject digest:
39082c03defd5be657af340f6cd310b172657d0979b08808e3b2bf684aa94547 - Sigstore transparency entry: 1570796533
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@189d23c8cf72a88ebeaebe50c78a789b84f838b7 -
Branch / Tag:
refs/tags/condor-retl/v0.1.1 - Owner: https://github.com/condorgraph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@189d23c8cf72a88ebeaebe50c78a789b84f838b7 -
Trigger Event:
workflow_dispatch
-
Statement type: