Defining a Dataset Schema
A dataset schema lets you describe the structure of your data before uploading it. Schemas are a feature of V4 datasets and enable:
- Named, typed fields that drive what participants see
dataset_fielditems inbatch_itemsthat pull dataset values directly into your task layout- Per-record validation during import (with strict mode)
- Structured metadata and custom task grouping
Creating a dataset with a schema
Pass a schema object when creating a dataset.
Field types
Strict mode
The strict flag controls how missing fields are handled during import.
Schema constraints
- Maximum 200 fields per schema.
- Field keys: 1–128 characters.
- Field labels: maximum 255 characters.
- At most one field of type
task_group_idper schema.
Referencing schema fields in the batch layout
Once a dataset with a schema is attached to a batch, you can use dataset_field items in batch_items to display dataset values to participants.
Only fields of type text or image_url can be referenced by dataset_field items. metadata and task_group_id fields are not displayed to participants.
Retrieving a dataset with its schema
The response includes the current schema and all import jobs: