Skip to content

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

Modal 6 min read How-to mediumAdept

Why you should move your ETL stack to Modal

Modal's serverless Python functions can replace ETL vendors and orchestrators for simple batch jobs. A worked example copies 12M ClickHouse rows into Snowflake in 16 minutes for about $0.29, using five parallel per-date jobs via for_each and 10,000-row executemany batches under Snowflake's 16,384-row insert limit. Fivetran pricing for the same volume is estimated at roughly $3,300. A second example enriches warehouse users with company data from the GitHub API on a cron schedule, while Fivetran and Airflow are still recommended for common connectors and long-running multi-stage pipelines that need partial retries and observability.

Related posts

  • 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.

  • My first 3 months at incident.io

    incident.io mediumAdept

    A new Data Engineer's first quarter rebuilding a Fivetran, BigQuery, dbt, CircleCI and Omni data stack. Uploading dbt artifacts to GCS after each production run enabled `defer` for local development and `state:modified` for faster, more reliable CI. Prebuilt Docker images of the dbt repo replaced per-job environment setup. Google Datastream, Stitch and Airbyte all cost more than Fivetran because the Cloud SQL Postgres workload is upsert-heavy, so Fivetran stayed. Clustering Fivetran destination tables by primary key cut their BigQuery cost by about 75%, and making heavy dbt models incremental with enforced partitioning cut dbt costs by about 20%.

  • How AdGreetz Processes Millions of Daily Ad Impressions with ClickHouse Cloud

    ClickHouse easyNovice

    AdGreetz moved its ad impression analytics from AWS Athena to Snowflake and then to ClickHouse Cloud, citing roughly six times lower cost than a small Snowflake standard plan and sub-second rather than multi-second queries. The pipeline ingests 5-6 million impressions a day, peaking at 20-30 million, through Cloudflare Workers. The workers acknowledge each event, enrich it in the background, and insert JSON over HTTP using async inserts, so no Kafka buffering layer is needed. Data is partitioned by time, aggregated with materialized views, isolated per customer with filtering views, and served to partners through Metabase dashboards.

  • The foundations of Canva’s continuous data platform with Snowpipe Streaming

    Canva Engineering mediumAdept

    Canva replaced AWS Data Firehose, which accounted for nearly half its product analytics platform cost because of 5 KB minimum record billing, with Snowpipe Streaming fed directly from Kinesis Data Streams via the Kinesis Client Library. One Snowpipe channel maps to each Kinesis shard. KCL shard stealing invalidates every channel on a shared client, so Canva runs one Snowflake client per shard, trading compression and per-client cost for reliability, and uses a LeaseCoordinator workaround to drop unhealthy leases. After six months and 20 PiB processed, cloud spend fell 45% and time-to-query dropped to about 10 minutes, with a 5-minute MAX_CLIENT_LAG and larger buffers recommended for lower costs.

  • From multi-day latency to near real-time insights: Figma’s data pipeline upgrade

    Figma mediumAdept

    Figma replaced a daily `SELECT *` export from RDS Postgres to Snowflake, which had grown to six-hour syncs and multi-day lag on the largest tables, with an in-house incremental sync pipeline. It bootstraps tables from RDS snapshot exports to S3, streams CDC through Kafka Connect on MSK into Snowflake, and applies changes with a custom MERGE stored procedure run by Snowflake tasks. Versioned artifacts allow zero-downtime re-bootstraps, and a cell-level, CDC-aware validation workflow checks correctness, all orchestrated with AWS Step Functions. Data freshness dropped from 30+ hours to 3 hours or less, configurable down to minutes, and the pipeline handles tables 10x larger while eliminating costly extra replicas.

The quest for software engineering knowledge.

Look:
Layout: