Here is how I do this now:
sql_q = """INSERT INTO measurements(time, voltage, current, frequency, powerActive, powerReactive, powerApparent, powerF