     (println)
     cdata))
 
-(defn std-reducer
-  "Standard reducer."
-  [data]
-  (println "Reducing data with standard reducer...")
-  (let [rdata (time (doall (reduce into data)))]
-    (println "Number of rows:" (count rdata))
-    (println)
-    rdata))
-
-(defn flatten-reducer
-  "Flatten reducer."
-  [data]
-  (println "Reducing data with flatten reducer...")
-  (let [rdata (time (doall (flatten data)))]
-    (println "Number of rows:" (count rdata))
-    (println)
-    rdata))
-
-(defn rflatten-reducer
-  "R/flatten reducer."
-  [data]
-  (println "Reducing data with r/flatten reducer...")
-  (let [rdata (time (doall (into [] (r/flatten data))))]
-    (println "Number of rows:" (count rdata))
-    (println)
-    rdata))
+(defn reduce-flatter
+  "Reduce flatter."
+  [data]
+  (println "Flatting data with reduce...")
+  (let [fdata (time (doall (reduce into data)))]
+    (println "Number of rows:" (count fdata))
+    (println)
+    fdata))
+
+(defn rreduce-flatter
+  "R/reduce flatter."
+  [data]
+  (println "Flatting data with r/reduce...")
+  (let [fdata (time (doall (r/reduce into [] data)))]
+    (println "Number of rows:" (count fdata))
+    (println)
+    fdata))
+
+(defn flatten-flatter
+  "Flatten flatter."
+  [data]
+  (println "Flatting data with flatten...")
+  (let [fdata (time (doall (flatten data)))]
+    (println "Number of rows:" (count fdata))
+    (println)
+    fdata))
+
+(defn rflatten-flatter
+  "R/flatten flatter."
+  [data]
+  (println "Flatting data with r/flatten...")
+  (let [fdata (time (doall (into [] (r/flatten data))))]
+    (println "Number of rows:" (count fdata))
+    (println)
+    fdata))
 
 (defn par-fetch [session fetch! paths tenant rollup period from to]
   "Fetch data in parallel fashion."

    "path = ? AND tenant = ? AND rollup = ? AND period = ? "
    "AND time >= ? AND time <= ? ORDER BY time ASC;")))

(defn std-cleaner
  "Standard cleaner."
  [data]
  (println "Cleaning data with standard cleaner...")
  (let [cdata (time (doall (remove nil? data)))]
    (println "Number of rows:" (count cdata))
    (println)
    cdata))

(defn r-cleaner
  "R/remove cleaner."
  [data]
  (println "Cleaning data with r/remove cleaner...")

    (println)
    (let [paths (es-get-paths eshost path tenant)
          data (c-get-data chost paths tenant rollup period from to)
          reduce-fdata (reduce-flatter data)
          rreduce-fdata (rreduce-flatter data)
          flatten-fdata (flatten-flatter data)
          rflatten-fdata (rflatten-flatter data)
          remove-cdata (remove-cleaner reduce-fdata)
          rremove-cdata (rremove-cleaner reduce-fdata)]))
  (println "Finish time:" (tl/format-local-time (tl/local-now) :rfc822)))

;;------------------------------------------------------------------------------
