Created
July 11, 2018 09:31
-
-
Save echohes/f797b6c7b3afcf82e6eaba80c32928d0 to your computer and use it in GitHub Desktop.
Export data to Tarantool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csv = require("csv") | |
f = require("fio").open("/usr/local/share/tarantool/data.csv", { "O_RDONLY"}) | |
for i, tup in csv.iterate(f) do | |
if tonumber(tup[1]) then | |
box.space.recall:upsert({tonumber(tup[1])},{{'=',1,0}}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment