Code Repositories
Explore how Code Repositories host your transform logic — Python or SQL — with built-in checks, previews, and collaboration.
1 · Anatomy of a Code Repository
A Code Repository is a Git repository hosted inside Foundry. It contains your transform source code, a configuration file that declares inputs and outputs, and any supporting libraries.
You edit code in the browser-based Code Editor or clone the repo locally with the Foundry CLI. Changes go through branches and pull requests just like any modern Git workflow.
2 · Preview and Checks
Before merging, you can preview a transform — Foundry runs it on a sample of the input data and shows you the output schema and sample rows. This catches type errors, null-handling bugs, and logic mistakes before they reach production.
Checks run automatically on every branch push: linting, type validation, and dependency resolution. If a check fails, the merge is blocked.
3 · Multi-Transform Repositories
A single repository can contain many transforms. Foundry reads the declared inputs and outputs to build a dependency graph — it knows which transform to run first. This means you can organise related transforms together (e.g., all revenue-pipeline logic in one repo) while Foundry handles the build order.
✅ Key Takeaways
- Code Repositories are Git repos hosted inside Foundry.
- You can edit in-browser or clone locally with the Foundry CLI.
- Preview runs transforms on sample data to catch errors early.
- Automatic checks block broken code from merging to main.