# Data Transformation at the Edge

> Type-safe data transformation at global edge locations. Build ETL/ELT pipelines, validate schemas, and process streams with zero dependencies.

Canonical: https://transform.do/

## In code

```ts
import { Transform } from 'transform.do'

// Type-safe data transformation
const pipeline = Transform.pipeline({
  steps: [
    Transform.map(user => ({ ...user, domain: user.email.split('@')[1] })),
    Transform.map(user => ({ ...user, days: daysSince(user.signupDate) })),
    Transform.enrich(user => $.Clearbit.query({ domain: user.domain }))
  ]
})

// Transform and validate automatically
on.Webhook.received(async $ => {
  const data = await pipeline.transform($.data)
  $.Database.insert.Order(data)
})
```

## Frequently asked questions

### Why use transform.do instead of ETL tools or npm packages?

Transform.do runs at the edge with sub-millisecond latency and zero cold starts. No dependencies to manage, no package vulnerabilities, no version conflicts. Built-in validation, schema evolution, and error handling that traditional ETL tools lack. Automatic scaling handles 1 record/sec to 1M records/sec with consistent performance. Edge-native means transformations run close to data sources (APIs, databases, streams) reducing latency by 90%. Type safety catches errors at compile time, not production.

### How do transformations compose and chain together?

All transformations use semantic types and compose naturally with standard TypeScript patterns. Chain transformations with map/filter/reduce operations, pipe data through multiple pipelines, or build complex ETL workflows with branching logic. Full type inference across entire pipeline—IDE autocomplete shows exact output schema at each step. Transformations are pure functions that can be tested, versioned, and reused across projects. Build transformation libraries that others can import and extend.

### What about performance and cost for large-scale transformations?

Sub-millisecond execution at the edge with automatic caching of identical transformations. Parallel processing handles millions of records per second with automatic work distribution across edge locations. Stream processing for datasets that don't fit in memory. Pay only for actual compute time, not idle resources. First 100K transformations daily are free, then <$0.001 per 1000 operations. 95% cost reduction vs traditional ETL tools through edge optimization and intelligent caching.

### Can I customize transformation logic and add complex rules?

Yes. Write custom transformation functions in TypeScript with full type safety. Add conditional logic, external API calls, database lookups, or ML model inference within transformations. Define reusable transformation modules that can be shared across pipelines. Build domain-specific transformation languages (DSLs) on top of the core primitives. Schema evolution handles changing data formats automatically. A/B test different transformation strategies to measure impact on data quality and performance.

### How reliable are transformations at scale?

Battle-tested across billions of transformations daily. Automatic retries for transient failures, dead letter queues for persistent errors, and detailed error logs with full context. Schema validation catches data quality issues before they propagate downstream. Exactly-once processing guarantees for critical pipelines—no duplicate records. 99.99% uptime SLA with automatic failover across 300+ global edge locations. Zero data loss guarantee with automatic backups and replay capabilities.

## Part of Platform.do

transform.do is one of the primitives of Platform.do, in the Workflows layer (triggers, steps and functions). Every .do shares one grammar, Business-as-Code, and one SDK.

- What is Business-as-Code? https://platform.do/business-as-code
- Platform.do: https://platform.do/
- Docs: https://docs.platform.do
