         ctx (warn-if-extraneous-headers ctx data-spec headers column-names)]
     (if (empty? (set/intersection (set headers) (set column-names)))
       (errors/add-errors ctx :critical table :global :no-header "No header row")
+      ;; Local file context needed for any given row during processing
       (->> {:in-file in-file
             :sql-table (get tables table)
             :headers headers

(defn process-row-chunks
  "Processes all the map rows in a chunk via `process-row` with the
  supplied format-rules (see `data-spec/create-format-rules` in
  `do-bulk-import-and-validate-csv`) transforms (see
  `data-spec/translation-fns` in
  `do-bulk-import-and-validate-csv`). Inserts the row into the
  database, and records any UNIQUE constraint-failing SQLExceptions as
  errors. Returns the context ctx. If the supplied chunk is empty,
  simply returns the context as-is."
  [{:keys [columns filename] :as data-spec}
   {:keys [transforms column-names headers sql-table line-number] :as file-ctx}

  "Prepares all the necessary formatting and transformation functions
  along with other useful meta-data and initiates the insertion and
  preliminary validation of CSV data using the chunking mechanism in
  vip.data-processor.db.util/chunk-rows. Returns the context `ctx`
  having performed all necessary database insertions, error reporting,
  and other preliminary validation."
  [{:keys [data-specs tables] :as ctx}
   {:keys [filename table columns] :as data-spec}
   in-file]
