5

I want to transfer lot of data(>10gb) from my MySQL database to Aerospike. What is the best approach for the same? I know that I can dump MySQL data to CSV and then read it in Aerospike but I wanted to know if their is any other approach with smaller SLA or more secure way for it.

user3118438
  • 87
  • 1
  • 5

2 Answers2

6

The easiest would be to SELECT INTO OUTFILE using the necessary delimiters and line endings to make the output CSV compatible. You would then use the aerospike loader tool (aerospike/aerospike-loader) to load the data into Aerospike. The tool allows you to use multiple threads to read and write in parallel, so it's quite fast.

Ronen Botzer
  • 6,951
  • 22
  • 41
3

If you are interested in a one-time migration only I would recommend the CSV-Export/-Import way. If you migrate the table structure (CREATE-Statements) you dont have to worry about the datatypes too much.

Another way would be a script/programm/ETL-Tool connecting to mysql, read line-by-line and write line-by-line (entity-by-entity?) to aerospike. Depending on the brain you invest in such a solution you might/might not end up with a (very) slow/fast solution. imho this makes sense for a regular data exchange only.

Benvorth
  • 7,416
  • 8
  • 49
  • 70