Skip to content

Instantly share code, notes, and snippets.

@echohes
Created July 11, 2018 09:31
Show Gist options
  • Save echohes/f797b6c7b3afcf82e6eaba80c32928d0 to your computer and use it in GitHub Desktop.
Save echohes/f797b6c7b3afcf82e6eaba80c32928d0 to your computer and use it in GitHub Desktop.
Export data to Tarantool
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