update_schema_incremental
Add new fields to a schema or remove existing ones while preserving historical data. Creates and activates a new schema version immediately for new data storage, with optional migration of existing data to maintain consistency.
Instructions
Incrementally update a schema by adding new fields from raw_fragments or agent recommendations. Creates new schema version and activates it immediately, so all new data stored after this call will use the updated schema. Optionally migrates existing raw_fragments to observations for historical data backfill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_type | Yes | Entity type to update | |
| fields_to_add | No | Fields to add to schema | |
| fields_to_remove | No | Field names to remove from schema (triggers major version bump). Observation data is preserved; fields can be restored by re-adding them later. | |
| schema_version | No | New schema version (auto-increments if not provided) | |
| user_specific | No | Create user-specific schema variant (default: false) | |
| user_id | No | User ID for user-specific schema (required if user_specific=true) | |
| activate | No | Activate schema immediately so it applies to new data (default: true). If false, schema is registered but not active. | |
| migrate_existing | No | Migrate existing raw_fragments to observations for historical data backfill (default: false). Note: New data automatically uses updated schema after activation, migration is only for old data. |