Migrating timeseries data from MariaDB to InfluxDB


How should I go about importing some existing data from MariaDB to InfluxDB?

Best regards,

Well, this is a very big question. First, it’s potentially not a one to one comparison. Influx isn’t like a RDBMS. Yes, there are similarities, but enough differences that you first need to decide HOW you want to store the data. You need to decide on a schema model for the data. That takes time, depending on your current schema in mariaDB. Are you able to provide some examples of what your current data looks like?

Some quick influx vocabulary.
Tables are called measurements.
Columns are called field keys.
Types of fields are auto determined based on the first value inserted. but once determined, CAN NOT be changed. I.E. you can’t insert a string into a field that first got an integer or a float. (insert is rejected)
Every measurement (aka table) can have tags. Think of a tag like an index column. But you can’t have too many of these, because each unique value in it creates Cardinality. Too much Cardinality is bad.


Thanks for your assistance Jeffery,

I am currently looking into a script that imports from csv, and of course, as you said, it doesn’t seem to be a straight-forward task. I’ll update here for the record once I get to something.

By the way, this video helped a ton as well on my quest to grasp how influxDB works:

1 Like