               :words
               [[:id :int "PRIMARY KEY"]
                [:word "VARCHAR(32)"]])))
-    (doseq [word words]
-      (jdbc/insert! cpool :words word))))
+    (doseq [word all-words]
+      (jdbc/execute! cpool (mysql/upsert :words
+                                         (dissoc word :id)
+                                         (dissoc word :word))))))
 
 (defn transform-word
   [word]

   {:id 4 :word "Door"}
   {:id 5 :word "Surf board"}])

(defn ensure-database! [db-user db-pass db-sub-base db-name]
  (let [db-spec {:classname "com.mysql.jdbc.Driver"
                 :subprotocol "mysql"


(deftest sql-update-output-test
  (let [{:keys [env-config peer-config mysql-config]} (read-config
                                                       (io/resource "config.edn")
                                                       {:profile :test})
        {:keys [sql/username sql/password sql/subname sql/db-name]} mysql-config
        job (build-job username password subname db-name 10 1000)
        {:keys [in]} (get-core-async-channels job)
