 	 :query ::aggregation.bubble/query)
   :ret any?)
 
-(s/def ::aggregation.line/metricColumnX ::db.dsv.column/columnName)
-(s/def ::aggregation.line/metricColumnY ::db.dsv.column/columnName)
+(s/def ::aggregation.line/metricColumnX ::db.dsv.column.s/columnName)
+(s/def ::aggregation.line/metricColumnY ::db.dsv.column.s/columnName)
 (s/def ::aggregation.line/metricAggregation (s/nilable ::aggregation.bar/metricAggregation))
 
 (s/def ::aggregation.line/query (s/keys :req-un [::postgres.filter/filters

            [akvo.lumen.lib.aggregation.bubble :as aggregation.bubble]
            [akvo.lumen.lib.aggregation.line :as aggregation.line]
            [akvo.lumen.lib.aggregation.pie :as aggregation.pie]
            [akvo.lumen.lib.aggregation.scatter :as aggregation.scatter]
            [akvo.lumen.lib.aggregation.pivot :as aggregation.pivot]
            [akvo.lumen.postgres.filter :as postgres.filter]
            [akvo.lumen.specs :as lumen.s :refer (sample)]
            [akvo.lumen.specs.db :as db.s]
            [akvo.lumen.specs.db :as db.s]
            [akvo.lumen.util :as u]
            [clojure.spec.alpha :as s]
            [clojure.spec.gen.alpha :as gen]
            [clojure.string :as string]
            [clojure.tools.logging :as log]))

(create-ns  'akvo.lumen.specs.aggregation.query)
(alias 'aggregation.query.s 'akvo.lumen.specs.aggregation.query)

(alias 'db.dsv.column 'akvo.lumen.specs.db.dataset-version.column)
(alias 'db.dsv 'akvo.lumen.specs.db.dataset-version)

(s/def ::aggregation/dataset (s/keys :req-un [::db.dsv/columns ::db.dsv/table-name]))
(s/def ::aggregation.pie/bucketColumn ::db.dsv.column/columnName)
(s/def ::aggregation.pie/query (s/keys :req-un [::postgres.filter/filters
                                                ::aggregation.pie/bucketColumn]))


	 :query ::aggregation.pie/query)
  :ret any?)

(s/def ::aggregation.pivot/categoryColumn ::db.dsv.column.s/columnName)
(s/def ::aggregation.pivot/rowColumn ::db.dsv.column.s/columnName)
(s/def ::aggregation.pivot/valueColumn ::db.dsv.column.s/columnName)
(s/def ::aggregation.pivot/aggregation #{"mean"
                                         "sum"
                                         "min"
