💡 lakeFS Pro Tip # 348,921: Branch Protection! 🔒
You can configure certain lakeFS branches (or branch patterns) to be protected: this means they can't be directly written to, you have to merge another branch into them.
🤔 Why is that useful? Because of lakeFS Hooks, of course!
🪝 Using pre-merge hooks you can run your own logic as a condition for the merge to happen. Think GitOps, for data!
This is really powerful because it allows:
⭐️ Performing schema validation prior to applying modifications to tables
⭐️ Running data quality checks - only high quality data on main!
⭐️ Ensuring consistency and referential integrity - since branches work across tables and datasets, you can make sure foreign key relations are consistent!
⭐️ Enforcing data contracts: ensure all values meet a specific, codified set of constraints
⭐️ Compliance - Branch protection makes it much easier to ensure sensitive data doesn't leak by running PII checks before data is exposed to consumers
And many more! See first comment for more interesting use cases and patterns enabled by branch protection