Skip to contents

Resolve encountered source values to target reference values

Usage

map_reference_values(
  prepared,
  target,
  values,
  source_table = NULL,
  source_lookup = NULL,
  target_lookup = NULL,
  property = NULL
)

Arguments

prepared

A result from prepare_mapping_references().

target

One prepared target table ID.

values

Character vector or list of scalar text values. NULL elements, NA and empty text indicate missing input; other types are rejected.

source_table

Optional source table selector.

source_lookup

Optional effective source lookup selector.

target_lookup

Optional effective target lookup selector.

property

Optional returned target property selector.

Value

A data frame with one row per input in original order. Scalar columns are source_value, target_value, status and stage. List columns retain source_rows, target_rows, target_candidates and correspondence_values. Row indexes address the corresponding prepared reference index's data. The provenance attribute contains the selected mapping, configuration checksum, catalogue revisions and any correspondence-file checksum.

Details

Selectors must identify exactly one mapping; alternatives are never fallbacks. Status is resolved, missing_input, missing_source_record, missing_property, no_match or ambiguous. Stage is input, source, correspondence or target. Only resolved results receive a target value. Source and target ambiguities retain all matching rows even if their requested properties agree. Conflicting CSV targets remain ambiguous even if target aliases would converge. Repeated inputs and reusable target lookups are evaluated together. The caller decides whether unresolved results block a field, row or export.