Process to import sql data

We collect data for some wifi stats on 2 different computers. One doesn’t support the way we collect data easily, so we made some custom solution (not my solution) that sends all the data to a sql DB for us to merge some other data on to it. However once done, we want to export this data to influx to match some of the other stuff we have.

Question is… i’m not exactly sure the best way to do this…

  1. Run a stored proc or something on SQL to export in line protocol
  2. Write a similar flux query to get it then use the “to” function to write it out?
  3. Something better, maybe?

We utilize telegraf in a lot of places, so i’m inclined to use that, but not quite sure what I would use for this. It is getting data every second, so this would need to be a continuous running process, which is why i’m inclined to use a trigger/stored proc on the sql side.
We have 20 tags or so that need to go, its all pretty straightforward i’m just lost.

Hello @boris377,
Have you considered using a task to schedule periodic use of flux source functions?
using sql.to()


using sql.from()

Are these resources useful to you?

Mike has informed me we are on 1.x enterprise and this sql.to is likely not available.

Do we have other options to import this?

Why not try to write a python parser?
I would suggest getting the SQL data as a dataframe and save it to Influx?
I’ve built something similar for MongoDB to Influx and vice versa.

Maybe this helps as well: https://influxdb-python.readthedocs.io/en/latest/index.html