MARC Record Validation - ubtue/ub_tools GitHub Wiki

Records validation is carried out by our validate_harvested_records tool. The rules that are used are stored in the ub_tools.metadata_presence_tracer table. We differentiate between two flavours of records: regular articles and review articles. Rules for regular articles also apply to review article records unless there is a specific rule for review articles. Rules either apply to an entire MARC field or a subfield of a MARC field. Rules can be specific to a particular serial or generic applying to all serials.

Validation proceeds conceptually as follows:

  1. A record is valid if all its fields are valid. That includes that required fields are present.

  2. A record is invalid if a required field is missing or a required subfield is missing.

  3. Rules are applied for all fields in a conceptual inheritance order:
    For each field:

    3.1. If a record describes a review article and there is a rule for the serial that the record belongs to, then that rule will be applied.

    3.2. If a record describes a review article and there is a generic rule for all serials, then that rule will be applied.

    3.3. If there is a rule for the serial that the record belongs to and any type of article, then that rule will be applied.

    3.4. If there is a rule for all serials and any type of article then that rule will be applied.

    After the first matching rule no additional rules will be applied.

⚠️ **GitHub.com Fallback** ⚠️