|
| 1 | +--- |
| 2 | +title: "Data processing & ETL workflows" |
| 3 | +sidebarTitle: "Data processing & ETL" |
| 4 | +description: "Learn how to use Trigger.dev for data processing and ETL (Extract, Transform, Load), including web scraping, database synchronization, batch enrichment and more." |
| 5 | +--- |
| 6 | + |
| 7 | +import UseCasesCards from "/snippets/use-cases-cards.mdx"; |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +Build complex data pipelines that process large datasets without timeouts. Handle streaming analytics, batch enrichment, web scraping, database sync, and file processing with automatic retries and progress tracking. |
| 12 | + |
| 13 | +## Featured examples |
| 14 | + |
| 15 | +<CardGroup cols={3}> |
| 16 | + <Card |
| 17 | + title="Realtime CSV importer" |
| 18 | + icon="book" |
| 19 | + href="/guides/example-projects/realtime-csv-importer" |
| 20 | + > |
| 21 | + Import CSV files with progress streamed live to frontend. |
| 22 | + </Card> |
| 23 | + <Card title="Web scraper with BrowserBase" icon="book" href="/guides/examples/scrape-hacker-news"> |
| 24 | + Scrape websites using BrowserBase and Puppeteer. |
| 25 | + </Card> |
| 26 | + <Card |
| 27 | + title="Supabase database webhooks" |
| 28 | + icon="book" |
| 29 | + href="/guides/frameworks/supabase-edge-functions-database-webhooks" |
| 30 | + > |
| 31 | + Trigger tasks from Supabase database webhooks. |
| 32 | + </Card> |
| 33 | +</CardGroup> |
| 34 | + |
| 35 | +## Benefits of using Trigger.dev for data processing & ETL workflows |
| 36 | + |
| 37 | +**Process datasets for hours without timeouts:** Handle multi-hour transformations, large file processing, or complete database exports. No execution time limits. |
| 38 | + |
| 39 | +**Parallel processing with built-in rate limiting:** Process thousands of records simultaneously while respecting API rate limits. Scale efficiently without overwhelming downstream services. |
| 40 | + |
| 41 | +**Stream progress to your users in real-time:** Show row-by-row processing status updating live in your dashboard. Users see exactly where processing is and how long remains. |
| 42 | + |
| 43 | +## Production use cases |
| 44 | + |
| 45 | +<CardGroup cols={1}> |
| 46 | + <Card title="MagicSchool AI customer story" href="https://trigger.dev/customers/magicschool-ai-customer-story"> |
| 47 | + |
| 48 | +Read how MagicSchool AI uses Trigger.dev to generate insights from millions of student interactions. |
| 49 | + |
| 50 | +</Card> |
| 51 | + |
| 52 | +<Card title="Comp AI customer story" href="https://trigger.dev/customers/comp-ai-customer-story"> |
| 53 | + |
| 54 | +Read how Comp AI uses Trigger.dev to automate evidence collection at scale, powering their open source, AI-driven compliance platform. |
| 55 | + |
| 56 | +</Card> |
| 57 | +<Card title="Midday customer story" href="https://trigger.dev/customers/midday-customer-story"> |
| 58 | + |
| 59 | +Read how Midday use Trigger.dev to sync large volumes of bank transactions in their financial management platform. |
| 60 | + |
| 61 | +</Card> |
| 62 | +</CardGroup> |
| 63 | + |
| 64 | +## Example workflow patterns |
| 65 | + |
| 66 | +<Tabs> |
| 67 | + <Tab title="CSV file import"> |
| 68 | + Simple CSV import pipeline. Receives file upload, parses CSV rows, validates data, imports to database with progress tracking. |
| 69 | + |
| 70 | +<div align="center"> |
| 71 | + |
| 72 | +```mermaid |
| 73 | +graph TB |
| 74 | + A[importCSV] --> B[parseCSVFile] |
| 75 | + B --> C[validateRows] |
| 76 | + C --> D[bulkInsertToDB] |
| 77 | + D --> E[notifyCompletion] |
| 78 | +``` |
| 79 | + |
| 80 | +</div> |
| 81 | + </Tab> |
| 82 | + |
| 83 | + <Tab title="Multi-source ETL pipeline"> |
| 84 | + **Coordinator pattern with parallel extraction**. Batch triggers parallel extraction from multiple sources (APIs, databases, S3), transforms and validates data, loads to data warehouse with monitoring. |
| 85 | + |
| 86 | +<div align="center"> |
| 87 | + |
| 88 | +```mermaid |
| 89 | +graph TB |
| 90 | + A[runETLPipeline] --> B[coordinateExtraction] |
| 91 | + B --> C[batchTriggerAndWait] |
| 92 | +
|
| 93 | + C --> D[extractFromAPI] |
| 94 | + C --> E[extractFromDatabase] |
| 95 | + C --> F[extractFromS3] |
| 96 | +
|
| 97 | + D --> G[transformData] |
| 98 | + E --> G |
| 99 | + F --> G |
| 100 | +
|
| 101 | + G --> H[validateData] |
| 102 | + H --> I[loadToWarehouse] |
| 103 | +``` |
| 104 | + |
| 105 | +</div> |
| 106 | + </Tab> |
| 107 | + |
| 108 | + <Tab title="Parallel web scraping"> |
| 109 | + **Coordinator pattern with browser automation**. Launches headless browsers in parallel to scrape multiple pages, extracts structured data, cleans and normalizes content, stores in database. |
| 110 | + |
| 111 | +<div align="center"> |
| 112 | + |
| 113 | +```mermaid |
| 114 | +graph TB |
| 115 | + A[scrapeSite] --> B[coordinateScraping] |
| 116 | + B --> C[batchTriggerAndWait] |
| 117 | +
|
| 118 | + C --> D[scrapePage1] |
| 119 | + C --> E[scrapePage2] |
| 120 | + C --> F[scrapePageN] |
| 121 | +
|
| 122 | + D --> G[cleanData] |
| 123 | + E --> G |
| 124 | + F --> G |
| 125 | +
|
| 126 | + G --> H[normalizeData] |
| 127 | + H --> I[storeInDatabase] |
| 128 | +``` |
| 129 | + |
| 130 | +</div> |
| 131 | + </Tab> |
| 132 | + |
| 133 | + <Tab title="Batch data enrichment"> |
| 134 | + **Coordinator pattern with rate limiting**. Fetches records needing enrichment, batch triggers parallel API calls with configurable concurrency to respect rate limits, validates enriched data, updates database. |
| 135 | + |
| 136 | +<div align="center"> |
| 137 | + |
| 138 | +```mermaid |
| 139 | +graph TB |
| 140 | + A[enrichRecords] --> B[fetchRecordsToEnrich] |
| 141 | + B --> C[coordinateEnrichment] |
| 142 | + C --> D[batchTriggerAndWait] |
| 143 | +
|
| 144 | + D --> E[enrichRecord1] |
| 145 | + D --> F[enrichRecord2] |
| 146 | + D --> G[enrichRecordN] |
| 147 | +
|
| 148 | + E --> H[validateEnrichedData] |
| 149 | + F --> H |
| 150 | + G --> H |
| 151 | +
|
| 152 | + H --> I[updateDatabase] |
| 153 | +``` |
| 154 | + |
| 155 | +</div> |
| 156 | + </Tab> |
| 157 | +</Tabs> |
| 158 | + |
| 159 | +<UseCasesCards /> |
0 commit comments