 (ns org.akvo.lumen.transformation.engine
-  (:require [clojure.java.jdbc :as jdbc]
-            [hugsql.core :as hugsql]
+  (:require [hugsql.core :as hugsql]
             [org.akvo.lumen.util :as util])
   (:import java.sql.SQLException))
 

          (update-job-success-execution tenant-conn {:id job-id :exec-log full-execution-log})
          (deliver-promise-success completion-promise dataset-id new-dataset-version-id job-id))
        (let [{:keys [success? message columns execution-log]}
              (apply-operation tx-conn table-name columns (first transformations))]
          (if success?
            (recur (rest transformations) columns (into full-execution-log execution-log))
            (execute-transformation-failed completion-promise

           full-execution-log []]
      (if (empty? transformations)
        (let [new-dataset-version-id (str (util/squuid))]
          (clear-dataset-version-data-table tenant-conn {:id (:id current-dataset-version)})
          (new-dataset-version tenant-conn
                               {:id new-dataset-version-id
                                :dataset-id dataset-id
                                :job-execution-id job-id
