published fresh until

dlt: Load Stripe into DuckDB incrementally

Summary As of November 2026, use dlt’s incremental Stripe source for new BalanceTransaction records, preserve pipeline state, and snapshot editable objects separately with stripe_source. This created-cursor recipe does not refresh later field changes, including settlement status; inspect pipeline state with dlt pipeline stripe_transactions info.

Not for Stripe subscription Checkout and Customer Portal setup, see stripe-subscriptions-saas-checkout-portal-lifecycle-events

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Use incremental_stripe_source for new Stripe BalanceTransaction records and keep the same dlt pipeline identity on every run. This created-cursor recipe does not refresh later field changes, including settlement status.

Do first: run python -m pip install 'dlt[duckdb]==1.32.0'

A created cursor finds new objects, not edits to old ones. Start with BalanceTransaction. Snapshot editable objects separately rather than promising change capture for every Stripe endpoint. The verified source distinguishes append-mode incremental records from replace-mode snapshots.

As of November 2026, dlt 1.32.0 is stable, Apache-2.0, requiring Python 3.10 or later and below 3.15 (checked 2026-11-24). Use a supported Python virtual environment and initialize the verified source:

python -m pip install 'dlt[duckdb]==1.32.0'
dlt init stripe_analytics duckdb
python -m pip install -r requirements.txt

Keep the generated source and requirements in your project. Review the generated example before running it; replace its demonstration calls with the narrow entry point below. Configure the Stripe test-mode secret through dlt's documented secret configuration for sources.stripe_analytics; never put it in code or logs. Follow the verified-source setup.

Create load_transactions.py beside the generated stripe_analytics directory:

from datetime import datetime, timezone
import dlt
from stripe_analytics import incremental_stripe_source

pipeline = dlt.pipeline(
    pipeline_name="stripe_transactions",
    destination="duckdb",
    dataset_name="stripe_incremental",
)

if __name__ == "__main__":
    source = incremental_stripe_source(
        endpoints=("BalanceTransaction",),
        initial_start_date=datetime(2026, 10, 1, tzinfo=timezone.utc),
    )
    print(pipeline.run(source))

The date is an example backfill boundary; choose your own. The official source implementation tracks created, supplies id as the resource primary key and appends. The DuckDB destination guide explains local file placement and destination configuration. Run from the same project directory, preserve the destination file and pipeline working state, and keep the pipeline and dataset names unchanged. Avoid dev_mode for the recurring job.

python load_transactions.py
dlt pipeline stripe_transactions info

Verify incremental behavior before scheduling

Run twice against the same test account with no new matching transactions. Compare load information, distinct transaction IDs and the cursor before and after. Expect no duplicate transaction IDs and no unnecessary reload of history; inspect actual rows rather than requiring identical log counts. Then create a test transaction through your normal application flow, rerun and confirm its balance transaction appears when available. Preserve the pipeline state between runs and use one writer for the local file.

For editable Customer, Invoice or Subscription records, use a separate stripe_source snapshot pipeline and dataset. Do not apply a bounded snapshot directly over your complete history: replace mode replaces the selected resource's table. The official DuckDB example demonstrates separate incremental and snapshot calls.

Pick the load mode by the question

ModeWinsLosesPick this if
Incremental BalanceTransactionHistorical transactions plus new arrivalsDoes not refresh later field changes, including settlement status, or edits to customer/subscription objectsYou need transaction analytics
Incremental EventRecent event-driven analysisCannot backfill arbitrary historyYour observation window fits Stripe event retention
stripe_source snapshotCurrent state of editable objectsRepeated reads; no change history by itselfYou need today's subscription or customer state

Sources checked 2026-10-28: Stripe's Events API exposes only the last 30 days. This ingestion recipe has local compute/storage costs, not a quoted managed-service price. API reads remain subject to Stripe rate limits; plan for throttling rather than parallelizing without bounds. The verified-source docs specify Stripe SDK compatibility from 5.x through 15.x and a pinned API date of 2022-11-15; later API fields may be absent. Keep its dependency constraints instead of upgrading the SDK independently.

Solo default: local DuckDB plus BalanceTransaction. Small-team default: the same job with persistent storage, one scheduled writer and monitoring. Enterprise default: first define reconciliation, recovery and data-access controls; this local recipe alone is not a shared ingestion service.

Community evidence

patawan, 31 July 2025, dlt issue #2950 reported “Verified Stripe source fails on AWS MWAA”. That deployment uses a modified source and Snowflake, so it is a warning against assuming portability, not evidence that this DuckDB recipe fails or succeeds.

Prompt for your agent

Initialize the verified Stripe source for DuckDB. Load only BalanceTransaction incrementally, preserve the pipeline identity, and show a second run with no duplicate IDs. Keep editable-object snapshots separate. Use test credentials already configured securely; do not display them.

Mistakes and limits

Do not treat created as an update cursor, leave a fixed historical end_date on the ongoing job, or lose state in an ephemeral runner. No account ingestion, restart recovery or reconciliation was run. Exactly-once delivery, deleted objects and complete billing history are not established by this recipe.

Started from a post by @dltHub, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# dlt: Load Stripe into DuckDB incrementally
Summary: As of November 2026, use dlt’s incremental Stripe source for new BalanceTransaction records, preserve pipeline state, and snapshot editable objects separately with stripe_source. This created-cursor recipe does not refresh later field changes, including settlement status; inspect pipeline state with `dlt pipeline stripe_transactions info`.
Copy for agent
get the whatworks thread dlt-stripe-duckdb-incremental-balance-transactions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread dlt-stripe-duckdb-incremental-balance-transactions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp