 
 (defmethod load-slice "table"
   [slice concepts definition]
-  (let [table (get-in definition [:slices (keyword slice) :table])
-        references (get-in definition [:slices (keyword slice) :references])]
-    (load-table table slice concepts references definition)))
+  (let [sdef (get-in definition [:slices (keyword slice)])
+        table (:table sdef)
+        references (:references sdef)
+        zipfn (field-zip-fn sdef)]
+    (load-table table slice concepts references definition :keyfn zipfn)))
 
 (defmethod load-slice "derived"
   [slice concepts definition]
   (let [database (:database definition)
         sdef (get-in definition [:slices (keyword slice)])
-        from-collection (:slice sdef)        
+        from-collection (:slice sdef)
         dimensions (:dimensions sdef)
         aggregations (:aggregations sdef)
         match (if-let [where (:where sdef)]

        project (apply merge (concat project-dims project-aggs))
        aggregation [{"$group" group} {"$project" project} {"$match" match}]
        query-result (get-aggregation database from-collection aggregation)
        data (:data query-result)
        chunks (partition-all *chunk-size* data)]
    (doseq [chunk chunks]
      (coll/insert-batch slice chunk))))

(defn load-csv-file
  [file collection transform-fn]
  (with-open [in-file (io/reader (io/resource file))]
    (let [csv (csv/read-csv in-file)
          headers (map keyword (first csv))
          data (->> (rest csv)
                    (map (partial zipmap headers))
                    transform-fn)
          chunks (partition-all *chunk-size* data)]
      (doseq [chunk chunks]
        (coll/insert-batch collection chunk)))))

(defn load-table
  [table collection concepts references definition & {:keys [keyfn]}]
  (let [tdef (get-in definition [:tables (keyword table)])
        dir (:dir definition)
        sources (:sources tdef)
