                                :dataset dataset
                                :concept concept
                                :columns columns
-                               :table (data/get-data-table (:data table) columns)        
+                               :table (data/get-data-table (:data table) columns)
                                :has-table? (not (empty? table))}))))
 
 (defmethod concept "application/json" [_ resource _]

(defn- ch->writer [ch]
  (io/writer (ch->outputstream ch)))

(defn- stream-slice-query-csv
  [request response data]
  (with-channel request ch
    (send! ch response false)
    (with-open [writer (ch->writer ch)]
      (csv/write-csv writer data))
    (close ch))
  response)

(defn- stream-slice-query-json
  [request response resource]
  (let [resource (hal/json-representation resource)]        
    (with-channel request ch
      (send! ch response false)
      (with-open [writer (ch->writer ch)]
        (json/generate-stream resource writer))
      (close ch))
    response))

(defn- stream-slice-query-jsonp
  [request response resource callback]  
  (let [resource (hal/json-representation resource)]
    (with-channel request ch
      (send! ch (assoc response :body (str callback "(")) false)
      (with-open [writer (ch->writer ch)]
        (json/generate-stream resource writer)
        (send! ch ");" true)))
    response))

(defn- stream-slice-query-xml
  [request response resource]
  (with-channel request ch
    (send! ch response false)
    (with-open [writer (ch->writer ch)]
      (xml/emit resource writer))
    (close ch))
  response)

(defmethod slice-query "text/csv" [_ resource {:keys [request query slicedef]}]
  (let [table (:table slicedef)

                                            (map second))
                               :concepts (->> (:embedded resource)
                                              (filter #(= (first %) "concept"))
                                              (map second))
                               :definition (with-out-str (pprint (:properties resource)))}))))

(defmethod dataset "application/json" [_ resource _]
