I have a toy project where I would like to add some string values into a Redis db. The input is coming from a huge CSV file. The (lazy) function below works fine , but I do not know how to add to the key the indexed value read into the input file - the two commented lines.
Could you give me hint/URL/reference for it? Thank you!
(defn collector [myfile]
(with-open [rdr (io/reader myfile)]
(doseq [line (line-seq rdr)]
; [idx (iterate inc 0)]
(let [[k v1 v2 v3 v4 v5 v6 v7] (clojure.string/split line #",")]
(red/set db
(str "key:" k)
;(str "key:" k ":" idx)
(str v1 "-" v5 "-" v6))))))