Skip to content

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

Etsy Code as Craft 10 min read Case study mediumAdept

Unlocking Faster Insights with Experimenter-Defined Segmentations

Etsy replaced the 13 hard-coded segmentations in its Catapult experimentation platform with experimenter-defined ones, each modeled as a SQL query that assigns segment values plus a set of approved join columns. New segmentations go through an orchestrated validation workflow that checks output schema and join keys and produces a BigQuery sample. Deployment then opens and auto-merges a pull request. The pipeline uses dynamic task generation to spawn one independent, sensor-gated task group per active segmentation, which isolates failures and lets downstream jobs start without waiting for the whole batch. Within three months segmentations grew from 13 to 47, and 78% of experimenters reported saving 2-5 hours a month.

Assumes: A/B testing basicsSQLworkflow orchestration DAGs

Related posts

  • How Klaviyo uses a 192-node ClickHouse cluster for real-time segmentation and personalization

    ClickHouse mediumAdept

    Klaviyo replaced a Python-orchestrated segmentation engine built on MySQL and a large Cassandra cluster of pre-aggregated counters with a 192-node on-prem ClickHouse cluster. The cluster is sharded first by company ID and then by profile ID, and computes segment membership with a single query in about one second instead of over an hour. Time-based conditions appear in roughly 60% of segments and used to be reprocessed on a schedule. To avoid that wasted work, the team built an entity-attribute-value table via a materialized view with the property name in the sort key, so conditions can be pushed down at read time. Updates now run in two phases: a lightweight query finds affected profile-segment pairs, which are chunked onto a message queue for parallel workers that can scale independently.

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

  • How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster

    ClickHouse mediumAdept

    LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud. Raw events are now queried directly, and materialized views are added only where needed. The system ingests about 6 PB/month of uncompressed JSON through an HTTP API, S3 protobuf batches, Lambda-converted Parquet and INSERT INTO SELECT. Data is fresh in about 30 seconds with roughly 100 days of retention, high-cardinality per-user analytics became practical, and seven product features now run on it. Lessons learned: don't coarsen ORDER BY keys, drop OLTP habits (for example, use two-stage queries for latest-N), and plan for workload isolation as adoption outpaces the platform team. Next steps are ingest-time joins for Release Guardian regression detection and migrating Elasticsearch workloads.

  • Appcues delivers personalized customer engagement with ClickHouse Cloud

    ClickHouse mediumAdept

    Appcues moved its customer-facing product analytics and segmentation from Snowflake plus Airflow rollups to ClickHouse Cloud, covering 1.31 PB of data and over 1 billion user profiles. Events flow through Kafka into a deduplicating consumer. Materialized views replaced the Airflow pre-aggregation jobs, and SharedReplacingMergeTree with argMax instead of FINAL resolves the latest profile state. Lightweight deletes in ClickHouse 25.6 cleared a GDPR deletion backlog. P95 query latency fell from 20+ seconds to under 2, ingestion-to-query latency dropped from 10+ minutes to about 5 seconds, and analytics spend fell 23%.

  • Data stack 2024

    incident.io mediumAdept

    incident.io's 2024 data stack runs Fivetran and Segment into BigQuery, dbt (run via Docker on CircleCI) for transforms, and Hightouch for reverse ETL. Analysis is split across Omni for internal BI, Explo for customer-facing embedded insights, and Hex for ad-hoc notebook work. Omni was chosen for its layered schema, shared and workbook models, which balance governance with flexibility. Local dbt development got faster by uploading each production manifest.json to GCS and wrapping `--defer --state` in bash aliases. Data pipeline failures, including flaky retries, now declare incidents and page responders automatically through incident.io's own On-call product, with urgency based on customer impact.

The quest for software engineering knowledge.

Look:
Layout: