       ctx)))
 
 (defn file-handle->string-keys
+  "Given a file handle, returns a collection of cleaned (of non word
+  characters), lower-cased string keys for the first line, assumed to
+  be the header row."
   [file-handle]
   (->> file-handle
        read-one-line

  (->> reader .readLine csv/read-csv first))

(defn warn-if-extraneous-headers
  [ctx {:keys [table] :as data-spec} headers column-names]
  (let [extraneous-headers (seq (set/difference (set headers) (set column-names)))]
    (if extraneous-headers

  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.

  Records an error if there are extraneous header columns or no
  overlap between the file headers and the data-spec column-names."
  [{:keys [data-specs tables] :as ctx}
   {:keys [filename table columns] :as data-spec}
   in-file]
