Writes invalid rows to a CSV file for manual review. Creates the output directory if it doesn't exist. Returns the path to the created file.
Examples
if (FALSE) { # \dontrun{
orphan_species <- validate_fk_references(con, "ichthyo", "species_id", "species", "species_id")
if (nrow(orphan_species) > 0) {
flag_invalid_rows(
invalid_rows = orphan_species,
output_path = "data/flagged/orphan_species.csv",
description = "Species IDs not found in species table")
}
} # }