Assert Field Consistency Between Data and Metadata
assert_field_consistency(new_data, field_info)
No return value. The function issues warnings if there are inconsistencies in field names.
A data frame. The new dataset whose field names need to be checked.
A data frame. Metadata containing a column named raw_field_name
that lists the expected field names.
This function checks for consistency between the field names in new data and the field names specified in a metadata reference. It warns if there are missing fields in the new data or if new unexpected fields appear in the data that are not defined in the metadata.