Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

DuckDB 5 min read Case study mediumAdept

How SproutMe Cut Integration Test Time by 92.9% with DuckDB

SproutMe runs its Dagster + dbt ad-analytics pipeline against a local DuckDB file for development and CI while keeping BigQuery in production, switching targets via environment variables (including forcing TZ=UTC to match BigQuery timestamp semantics). Across 88 CI runs the per-merge integration test step dropped from a median 639 s to 45.6 s (92.9%), and local dbt backfill and incremental builds were 42–60% faster. CI builds the whole dbt project on DuckDB from committed fixtures and compares selected models to golden files. The gains are scoped to the dev/test workflow and are not a general engine comparison; production migration would need separate evaluation.

Related posts

  • Updating our data stack

    incident.io mediumAdept

    incident.io's two-person data team reworked its BigQuery/dbt analytics stack as the company grew from 10 to 30 people. Fivetran moved to a separate BigQuery project after dbt tests in CI timed out because concurrent interactive queries exceeded BigQuery's 100-query quota. A CircleCI queue orb now serialises overlapping dbt runs that were creating and dropping the same tables. Unreliable GOOGLEFINANCE FX rates were replaced with a version-controlled seed plus a daily APILayer pull, checked by uniqueness and gaplessness tests. Models now materialise as tables rather than views, intermediate models sit between staging and fact/dimension models to avoid duplicated logic, SQLFluff enforces formatting, and Metabase folders separate sandbox work from locked-down core dashboards.

  • Building a cost-effective analytics stack with Modal, dlt, and dbt

    Modal mediumAdept

    Modal runs its whole analytics stack on Modal: dlt loads data from a Postgres read replica into Snowflake, dbt transforms it, and GitHub Actions handles CI/CD. dlt replaced hand-written psycopg2 code and removes manual schema definitions, Snowflake DDL and error-prone incremental logic. One daily job loaded about 1.4M rows in 47 seconds for fractions of a cent, versus an estimated $4,738/month on Fivetran. Also covered: fanning out per-table jobs with starmap, an "Activity Schema lite" dbt modeling approach with window-function concurrency queries, and a cicd.py script that discovers and deploys Modal apps from comment flags.

  • Retail data, reimagined: How Increff rebuilt its BI platform with ClickHouse

    ClickHouse mediumAdept

    Increff, a retail SaaS provider for brands like Puma and Adidas, replaced a BI stack of Pandas transformations, a serverless SQL warehouse and Superset after a client with 5x larger data caused query slowdowns and concurrency limits. The rebuilt platform uses DuckDB for most transformations, ClickHouse Cloud for warehousing and Redis caching for dashboards. It handles around a billion records at the same performance as before, with sub-second queries and 70–80% shorter data preparation times. Further tuning included a star schema with daily/weekly/monthly aggregated fact tables, time-based partitioning, LowCardinality and unsigned integer types, Jinja-templated Superset queries to drop unneeded joins, and explicit PREWHERE clauses.

  • How Render Workflows powers our internal data pipeline

    Render mediumAdept

    Render's two-person data team replaced a time-spaced set of cron jobs with a Render Workflows DAG that waits for a late-arriving Go-built invoice projection dataset, runs dbt in projection-independent and projection-dependent partial builds, then fans out downstream tasks like doc sync, cost monitoring and Metabase cache warming in parallel. The key pattern is retry-as-poll: the task's native retry engine (flat backoff, max retries) checks for a sentinel row in BigQuery without burning compute between polls. dbt runs as a subprocess with stdout streamed into task logs, and completion events land in a BigQuery table that drives accurate ETA estimates. Prod, dry-run and simulate execution modes, plus confining the Render SDK to main.py, keep the logic vendor-agnostic and testable in CI. Projected savings are $30K/year from fewer dbt runs and $70K from Metabase caching.

  • A modern data stack for startups

    incident.io mediumAdept

    A small startup data stack built in two weeks: Fivetran (plus Stitch for connectors Fivetran lacks, like the Close CRM) extracts data into BigQuery, dbt transforms it, and Metabase lets non-engineers explore it without SQL. The dbt project skips 'base' models and goes straight to staging tables, producing dimension and fact marts only when joining across sources or doing complex transforms, which keeps schema maintenance low. Other practical details: Fivetran's xmin-cursor fallback for Heroku Postgres without logical replication, per-engineer BigQuery dev datasets, and using dbt-metabase to turn dbt relationship tests into Metabase foreign keys so joins auto-fill.

The quest for software engineering knowledge.

Look:
Layout: