    :language [:MetaData :dc :language text]
    :source_publisher [:MetaData :ncc :sourcePublisher text]
    :source_edition [:MetaData :ncc :sourceDate text]
+   :narrator [:MetaData :ncc :narrator text]
    :volumes [:MetaData :ncc :setInfo text]
    :revision_date [:MetaData :ncc :revisionDate text]
    :mvl_only [:mvl_only text]

  [f]
  (if-let [error (validation/metadata-sync-errors f)]
    error
    (prod/update-or-create! (read-file f))))

(defn wrap-rows
  "Wrap an export record according to ABACUS conventions"

  and `periodical_number`"
  [{:keys [mvl_only command idVorstufe] :as raw-production}]
  (let [production_type (cond
                          (= command "mdaDocAdd_Kleinauftrag") "other"
                          (= mvl_only "yes") "periodical"
                          :else "book")]
    (-> raw-production
        (dissoc :mvl_only :command :idVorstufe)
        (merge {:production_type production_type
                :periodical_number (when (= production_type "periodical") idVorstufe)}))))

(defn read-file
  "Read an export file from ABACUS and return a map with all the data"
