Version Control
Manage your pipelines using Git and YAML
By using Git repositories and YAML files, you can apply familiar engineering workflows like pull requests, branching, and CI/CD to your projects.
Airfold workspaces are fully defined in YAML files, which enables you to leverage version control and CI/CD similar to tools like dbt, Terraform, and other infrastructure as code systems.
Your files represent data pipelines as code with Airfold.
Why use Version Control?
Restore Workspace History
Each commit represents the exact state of your Airfold workspace at a given point in time.
Easily navigate to and restore any previous version of the workspace to:
- Revert breaking changes
- Recover pipeline configurations or source definitions that were accidentally modified
Roll Back Issues
If a recent change causes unexpected errors, simply roll back to the last known working commit.
This is helpful for avoiding downtime in production by reverting to a stable state with minimal effort.
Enable Collaboration
Git enables multiple team members to work on the same workspace simultaneously without conflicts:
- Avoid overwriting others’ changes (a common risk when using a shared UI), where actions like multiple users pressing
save
on a query edit can accidentally overwrite each other’s changes - Git merge enables a structured way to combine contributions, reducing the risk of such conflicts and ensuring every update is reviewed
Seamless Sharing
Within your organization:
- Store your Airfold workspace files in a shared Git repository, ensuring all team members access to latest udpates
- Team members can work on individual tasks in separate branches, avoiding conflicts with ongoing production or staging workflows
- Use pull requests to propose changes and review code before merging
You can also open-source your Airfold workspaces just as you would with any Git repository, allowing the broader community to reuse and adapt your workspaces.
Branch for Production and Staging
Maintain separate branches for staging and production environments:
- Use staging for testing new pipelines, changes, or integrations
- Deploy only validated changes to production
File Structure
A typical Airfold project is organized into the following directory structure:
Pipes: Define the sequence of SQL transformations in your data pipeline
- Example: /pipes/sales_metrics.yaml
- See more on pipe.yaml
Sources: Define data sources
- Example: /sources/sales.yaml
- See more on source.yaml
Endpoints: (Optional) Define API endpoints for serving pipeline results.
- Example: /endpoints/sales_over_time.yaml
Workflow
Initialize
From your project directory, use Git to initialize version control:
Commit & Push
Commit existing workspace files to the repository:
Push your repository:
Branch for Staging and Production
Create a branch for staging:
Use this staging
branch to test new changes:
Once changes are validated, merge into production:
Best Practices
Use pull requests for any workspace updates:
- Enable code reviews before merging changes
Separate branches for staging and production:
main
for production-ready workspace configurationsstaging
for test configurations- See more on Staging and Production