                            (:slices definition))
         definition (dissoc definition :tables)]
     (with-db (get-db "metadata")
-      (coll/update "datasets" {:name name}
-                   definition
-                   :upsert true))))
+             (coll/update "datasets" {:name name}
+                          definition
+                          :upsert true))))
 
 (defmulti cast-value (fn [_ valuedef] (:type valuedef)))
 

(defn- build-types-for-slices
  [definition]
  (letfn [(build-types-for-slice [slice definition]
            (let [slice-def (get-in definition [:slices slice])
                  table-name (:table slice-def)
                  table-def (get-in definition [:tables (keyword table-name)])]
              (reduce (fn [definition column]
                        (if (and (:name column)
                                 ((set (data/slice-columns slice-def)) (:name column)))
                          (assoc-in definition
                                    [:slices slice :types (keyword (:name column))]
                                    (slice-type-for-table-type (:type column)))
                          definition))
                      definition
                      (vals (:columns table-def)))))]
    (let [slices (keys (:slices definition))]
      (reduce (fn [definition slice]
                (build-types-for-slice slice definition))

                  {:finalize (cljs finalize-fn)}))))

(defmethod load-slice "derived"
           [slice concepts definition]
  (let [mr (derived-slice-map-reduce slice definition)
        slicedef (get-in definition [:slices (keyword slice)])
        fields (data/slice-columns slicedef)
