   4. create all other data-groups to point new dataset-version-id
   5. touch dataset
   "
-  [{:keys [tenant-conn claims dataset-id] :as deps}
-   {:keys [job-execution-id transformation dataset-version data-groups]}
-   {:keys [previous-columns columns data-groups-to-be-created data-group]}]
+  [{:keys [tenant-conn claims] :as deps}
+   {:keys [job-execution-id transformation data-groups]}
+   {:keys [previous-columns columns data-groups-to-be-created data-group dataset-version]}]
   (let [new-dataset-version-id (str (util/squuid))]
     (db.dataset-version/new-dataset-version-2 tenant-conn {:id               new-dataset-version-id
-                                                           :dataset-id       dataset-id
+                                                           :dataset-id       (:dataset-id transformation)
                                                            :job-execution-id job-execution-id
                                                            :version          (inc (:version dataset-version))
                                                            :author           claims

                                                                                           "created" (Instant/ofEpochMilli (System/currentTimeMillis))
                                                                                           "changedColumns" (diff-columns previous-columns
                                                                                                                          columns))))})
    (when data-groups-to-be-created
      (let [max-group-order     (apply max (conj (map :group-order data-groups) 1000))
            adapted-data-groups (map-indexed (fn [i item]
                                               (let [idx        (inc (+ i max-group-order))

                {:transaction? false})
    (loop [transformations (butlast (:transformations current-dataset-version))
           columns initial-columns
           full-execution-log [] ;; TODO: remove not in use!
           tx-index 0]
      (if (empty? transformations)
        (let [new-dataset-version-id (str (util/squuid))]
