# oarepo\_oaipmh\_harvester.oai\_record.schema

## `oarepo_oaipmh_harvester.oai_record.schema`

Schema for OAI-PMH harvested records.

### `OAIHarvestedRecordSchema`

Bases: `BaseRecordSchema`

Schema for OAI-PMH harvested records.

#### `oai_identifier = fields.String(required=True)`

The OAI identifier of the record.

#### `record_pid = fields.String(allow_none=True)`

The persistent identifier of the record.

#### `datestamp = fields.DateTime(required=True)`

The OAI datestamp of the record.

#### `harvested_at = fields.DateTime(required=True)`

The time when the record was harvested.

#### `deleted = fields.Boolean(default=False, required=True)`

True if the record was deleted during the harvest.

#### `has_errors = fields.Boolean(default=False, required=True)`

True if the record has errors during the harvest.

#### `has_warnings = fields.Boolean(default=False, required=True)`

True if the record has warnings during the harvest.

#### `errors = fields.List(fields.Dict(default=dict, load_default=dict))`

Errors from the last write of the local record.

#### `original_data = fields.Dict(default=dict, load_default=dict)`

Original data as harvested from the OAI-PMH source.

#### `transformed_data = fields.Dict(default=dict, load_default=dict)`

Data after transformation, as written to the local record.

#### `run_id = fields.String(required=True)`

ID of the harvest run (invenio-jobs) that produced the record.
