My JSON MySQL loading tool is ready!

930 views
Skip to first unread message

Anders Karlsson

unread,
Jun 1, 2012, 8:40:05 AM6/1/12
to Jansson users
This is just a heads up that I am using json in mysqljsonload. This is
a tool that loads JSON data into MySQL and is available for download
here: http://sourceforge.net/projects/mysqljson/files/mysqlloadjson

The tool is simple enough, but it's pretty fast, has some
configuration options and should be useful if you want to load JSON
formatted data, such as a MongoDB export, into MySQL.

/Karlsson

Petri Lehtinen

unread,
Jun 1, 2012, 8:53:53 AM6/1/12
to jansso...@googlegroups.com
Nice!

I was going to ask how does it perform memory-wise, but after a quick
peek at the code, it seems that one database row corresponds to one
JSON object, and you use JSON_DISABLE_EOF_CHECK with json_loadf() to
load multiple objects from a single file.

Petri

Anders Karlsson

unread,
Jun 1, 2012, 9:26:39 AM6/1/12
to jansso...@googlegroups.com
Exactly. But note that the loading uses MySQL arrays, so inserts aren't
done row by row. I magaed to load about 10500 -11000 rows / s into a
MySQL table using InnoDB format which is pretty good. There is still
stuff to add, but now it works well, and jansson is brilliant for an
old-school C-developer like myself :-)

/Karlsson
Reply all
Reply to author
Forward
0 new messages