         chunks (->> query-result
                     :data
                     (partition-all *chunk-size*))]
+    (coll/drop to-collection)
     (log/info "Loading derived slice" slice)
     (doseq [chunk chunks]
       (coll/insert-batch to-collection chunk))))
 
 (defn- load-slice
-  [dataset slice slicedef]
+  [dataset slice slicedef tables dir]
   (let [dimensions (:dimensions slicedef)
         type (keyword (:type slicedef))]
     (log/info "Dropping slice" slice)
-    (coll/drop slice)
     (case type
-      :table (load-table-slice dataset slice slicedef)
+      :table (load-table-slice dataset slice slicedef tables dir)
       :derived (load-derived-slice dataset slice slicedef)
       (log/error "Cannot load slice" slice "with type" type))))
+
+(defn- concept-collection [concept]
+  (str "concept__" (name concept)))
+
+(defn- add-concept-to-slice
+  [dataset slice concept]
+  (let [collection (concept-collection concept)
+        query (q/partial-query (q/fields {}))
+        query-result (get-find dataset collection query)]
+    (doseq [row (:data query-result)]
+      (coll/update (name slice)
+                   {concept (concept row)}
+                   {"$set" {(keyword (str "__" (name concept))) row}}
+                   :multi true))))
 
 (defn- load-concept
   "Go through each slice and replace any dimensions that match a
 concept where the concept is backed by a table with the relevant row
 from that table."
-  [concept definition slices]
-  "whoa")
+  [dataset concept definition slices tables dir]
+  (if-let [table (:table definition)]
+    (let [concept (keyword concept)
+          tabledef ((keyword table) tables)
+          collection (concept-collection concept)]
+      (log/info "Loading table-backed concept" concept)
+      (load-collection collection tabledef dir)
+      (doseq [[slice slicedef] slices]
+        (when (contains? (set (slice-columns slicedef)) (name concept))
+          (log/info "Matching concept" concept "in" slice)
+          (add-concept-to-slice dataset slice concept))))))
 
 (defn load-dataset
   "Given the name of a dataset, load that dataset from disk into the

      (drake/run-workflow drakefile :targetv ["=..."]))
    
    (with-db (get-db dataset)
      (doseq [[table definition] tables]
        (log/info "Loading table" (name table) "for dataset" dataset)
        (load-table table definition dir))
      (doseq [slice slice-load-order]
        (log/info "Loading slice" (name slice) "for dataset" dataset)
        (load-slice dataset slice (slices slice)))
      (doseq [[concept definition] concepts]
        (log/info "Updating slices with concept" concept)        
        (load-concept concept definition slices))
      (doseq [[slice definition] slices]
        (log/info "Indexing slice" slice)
        (set-indexes slice (:dimensions definition))))))

      (doseq [chunk chunks]
        (coll/insert-batch collection chunk)))))

(defn- load-collection
  [collection tabledef dir]
  (coll/drop collection)  
  (let [sources (:sources tabledef)
        columns (:columns tabledef)
        agent-error-handler (fn [agent exception]
                              (log/error "Error in table loading agent"
                                         (.getMessage exception)))
        agents (map (fn [source]
                      (agent source
                             :error-mode :continue
                             :error-handler agent-error-handler))
                    sources)]
    (doseq [agent agents]
      (send-off agent (fn [file]
                        (load-csv-file collection (str dir "/" file) columns))))
    (apply await agents)))

(defn- load-table-slice
  [dataset slice slicedef tables dir]
  (let [table (:table slicedef)
        tabledef ((keyword table) tables)
        collection (name slice)]
    (log/info "Loading table-backed slice" slice)
    (load-collection collection tabledef dir)))

(defn- load-derived-slice
  [dataset slice slicedef]
