Dataset schemas can be locked to prevent changes
Dataset schema locking enables you to lock the schema of a dataset, preventing any modifications to its structure. This is useful when you want to ensure data consistency and prevent accidental changes to your dataset's columns, types, or other structural properties.
Overview
When schema locking is enabled on a dataset:
- The dataset schema becomes immutable
- No new columns can be added
- Existing columns cannot be removed or renamed
- Column types cannot be changed
- Structural modifications are blocked at the API level
Use cases
Schema locking is particularly useful for:
- Production datasets: Protect datasets that are actively being used by applications or reports
- Data governance: Enforce data structure standards across your organization
- Preventing accidental changes: Avoid unintended modifications to critical datasets
- API stability: Ensure consistency for API consumers relying on a specific schema
Enabling schema locking
To enable schema locking on a dataset, use the dataset settings or API:
PATCH /datasets/{dataset_id}
{
"schema_locked": true
}
Once enabled, any attempt to modify the dataset schema will return an error.
Disabling schema locking
To disable schema locking and allow schema modifications again:
PATCH /datasets/{dataset_id}
{
"schema_locked": false
}
Only users with appropriate permissions can enable or disable schema locking.
Permissions
Schema locking can only be modified by users with:
- Dataset owner permissions
- Admin role
- Explicit schema management permissions
Limitations
When schema locking is enabled:
- You cannot add new columns
- You cannot remove existing columns
- You cannot rename columns
- You cannot change column types
- You cannot modify column constraints or metadata
Data ingestion and updates to existing columns are still allowed.
Error handling
When schema locking is active and a schema modification is attempted, you'll receive an error response:
{
"error": "Schema is locked",
"message": "Cannot modify dataset schema. Schema locking is enabled.",
"status": 403
}Fetched July 17, 2026




