         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

  "Uses the supplied `format-rules` to process a given row. If there
  is a mismatch in the size of the columns in the row and the columns
  specified by the header, records an error. Increments the
  line-number and returns the context ctx with the formatted row
  merged in."
  [{:keys [filename table] :as data-spec}
   {:keys [line-number headers headers-count format-rules] :as file-ctx}

  "Converts the file into map rows using clojure.data.csv, chunks them
  up into partitions so that we don't go over our statement parameter
  limit, and then processes all the chunks using
  `process-row-chunks`. Returns the context `ctx`. If no headers are
  present reports an error and returns the context as-is."
  [ctx
   {:keys [table] :as data-spec}
