# dataset.getItemHistory() **Added in:** `@mastra/core@1.4.0` Retrieves the full SCD-2 (Slowly Changing Dimension Type 2) history of a specific item across all dataset versions. ## Usage example ```typescript import { Mastra } from "@mastra/core"; const mastra = new Mastra({ /* storage config */ }); const dataset = await mastra.datasets.get({ id: "dataset-id" }); const history = await dataset.getItemHistory({ itemId: "item-id" }); for (const row of history) { console.log(`Version ${row.datasetVersion}: ${row.isDeleted ? "deleted" : "active"}`); } ``` ## Parameters **itemId:** (`string`): ID of the item to retrieve history for. ## Returns **result:** (`Promise`): DatasetItemRowid:stringUnique row identifier.datasetId:stringID of the parent dataset.datasetVersion:numberDataset version for this row\.validTo:number | nullVersion at which this row was superseded, or \`null\` if still current.isDeleted:booleanWhether this row represents a deletion.input:unknownInput data at this version.groundTruth?:unknownGround truth at this version.metadata?:Record\Metadata at this version.createdAt:DateWhen this row was created.updatedAt:DateWhen this row was last updated.