connector-writer/destination/step-by-step/0-introduction.md
Summary: Complete guide to building a Dataflow CDK destination connector from scratch. Follow the numbered guides in sequence to build incrementally with clear milestones and quick feedback loops.
Goal: Get a working connector with basic sync modes as quickly as possible
Timeline: 2-3 days
Steps:
1-getting-started.md (Setup Phases 1-2, ~4 hours)
./destination-{db} --spec works2-database-setup.md (Database Phases 1-2, ~6 hours)
./destination-{db} --check --config config.json works3-write-infrastructure.md (Infrastructure Phases 1-2, ~4 hours)
4-write-operations.md (Write Phases 1-4, ~8 hours)
./destination-{db} --write works with append + overwrite modesResult: Working connector suitable for PoC and simple use cases
Goal: Production-ready connector with all enterprise features
Timeline: 5-7 days
Steps: 1-4. Complete Fast Path (above)
5-advanced-features.md (Advanced Phases 1-4, ~12 hours)
6-testing.md (Testing Phase 1, ~2 hours)
Result: Production-ready connector with all features
Goal: Fix issues quickly
When: Encountering errors during development
Steps:
Check 7-troubleshooting.md for common errors
Return to phase guide with solution
Result: Unblocked and back to development
| Guide | Phases | What Works | Tests | Prerequisites |
|---|---|---|---|---|
| 1-getting-started.md | Setup 1-2 | --spec | SpecTest | None |
| 2-database-setup.md | Database 1-2 | --check | TableOperationsSuite, CheckTest | Guide 1 |
| 3-write-infrastructure.md | Infrastructure 1-3 | DI ready | WriteInitTest | Guide 2 |
| 4-write-operations.md | Write 1-4 | --write (append, overwrite) | ConnectorWiringSuite | Guide 3 |
| 5-advanced-features.md | Advanced 1-3 | All features | TableSchemaEvolutionSuite | Guide 4 |
| 6-testing.md | Testing 1 | All tests pass | BasicFunctionalityIntegrationTest | Guide 5 |
| 7-troubleshooting.md | Reference | Debug help | - | Any |
| 8-validation.md | Checklist | Final verification | 9 test classes, 21+ tests | Guide 6 |
--spec operation returns connector capabilities--check operation validates configuration--write operation works for basic syncsBefore starting, understand these key patterns:
Component Roles:
Data Flow:
Platform → stdin → Lifecycle → Writer.setup()
→ createStreamLoader()
→ AggregateFactory.create()
→ InsertBuffer
→ Database
→ StreamLoader.close()
→ STATE → stdout → Platform
Testing Strategy:
During development:
Common pitfalls:
Start with: 1-getting-started.md
References: