SQL, TypeScript, and Agents
Essay by Tristan Handy. Argues that dbt’s Fusion engine is doing for SQL what TypeScript did for JavaScript: adding a type system that enables dramatically better tooling, especially for AI agents.
Curated Topics
- TypeScript parallel: Types were not the point — they enabled the tooling. TypeScript adoption went from 12% to 37% of developers (2017-2024) because tooling outstripped vanilla JS
- Fusion engine (GA in ~2 months): Real SQL compiler using Arrow type system across all warehouse dialects; ships with a language server providing real-time error detection, schema-aware autocomplete, inline lineage, and automated refactoring
- Agentic development loop: Agents work in write-check-fix cycles; quality of feedback determines output quality. Spotify found agents without verification loops produce code that doesn’t work. Claude Code ships native LSP support for millisecond structural feedback
- Agents need semantic tests: Structural tests (uniqueness, referential integrity) are necessary but insufficient. Unit tests asserting business logic correctness are the biggest friction point for safe agent operation in complex data repos
- Token economics: Skills + CLI benchmarks show 1,365 tokens vs MCP’s 44,026 tokens per task (10-32x cost advantage) in one study, though context-dependent
RDCO-Relevant Links
- Fusion GA timeline — critical for dbt consulting: client migrations, skills integration
- Unit test gap as agent bottleneck — positions RDCO to consult on test-coverage strategy for agentic readiness
- dbt agent skills as encoded best practices — directly relevant to our consulting delivery model