Forum: Building VoltDB Applications

Post: Getting data from MySQL into VoltDB?

Getting data from MySQL into VoltDB?
ian.hayes
Feb 6, 2015
I'm about to start investigations on VoltDB, and I'm wondering what the quickest method is for migrating data from a MySQL database into VoltDB.

I'm guessing that a number of authorities might suggest that this isn't a good thing to do, and I recognize that, but just as an initial test I would be interested in hearing the best approach for achieving my first goal.

TIA
Using Voltify to help port a MySQL schema
scooper
Feb 6, 2015
Hi,

VoltDB includes a utility (tools/voltify) to help with porting schemas from MySQL. Note that it doesn't port the data, just the schema. You can handle the data part using CSV export from MySQL and CSV import to VoltDB.

Please note that it is a good idea to read through the files that get generated to make sure the automated choices were reasonable.

The first time you run tools/voltify it will build a Python virtual environment with some additional libraries and then display a help screen. It may complain if you don't have mysql development libraries installed, python-mysql depends on it, but the Python installer can't install it.

If you run "voltify port" from an empty directory it will prepare an initial configuration, volt.cfg, that you can edit using "voltify config" commands or with a text editor. You need to provide your own connection string at the very least, but you can also customize some initial parameters for the voltdb project that is produced.

Voltify scrapes the schema information from the system tables of a running MySQL instance. So make sure the database is started and the configured connection string points to it before running "voltify port" again.

Look at ddl.sql for the annotated VoltDB schema. There will be comments that hint at things you may wish to think about.

Hope this helps. Enjoy getting started with VoltDB!

Steve