Hi all, i want to know with the plugin data manipulation (volkovlabs) how to make a double INSERT query, using the three variables in the form
i’m using Grafana v10.2.0
this is the form with the three variable
this is the complete script in the update request payload
this is the error
Request
{“status”:400,“statusText”:“Bad Request”,“data”:{“results”:{“A”:{“error”:“db query error: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘INSERT INTO sql.tab1 (var1, var4) VALUES (‘var1’, var4)’ at line 1”,“errorSource”:“”,“status”:500,“frames”:[{“schema”:{“refId”:“A”,“meta”:{“typeVersion”:[0,0],“executedQueryString”:“INSERT INTO sql.tab1 (var1, var2, var3) VALUES (‘var1’, ‘var2’, ‘89740496’);INSERT INTO sql.tab2 (var1, var4) VALUES (‘var1’, var4);”},“fields”:},“data”:{“values”:}}]}}},“config”:{“method”:“POST”,“url”:“api/ds/query”,“data”:{“queries”:[{“datasourceId”:12,“refId”:“A”,“rawSql”:“INSERT INTO sql.tab1 (var1, var2, var3) VALUES (‘var1’, ‘var2’, ‘89740496’);INSERT INTO sql.tab2 (var1, var4) VALUES (‘var1’, var4);”,“format”:“table”}]},“retry”:0,“headers”:{“X-Grafana-Org-Id”:1,“X-Grafana-Device-Id”:“dcbbdd185d1c15881f0c4aeab45ef11f”},“hideFromInspector”:false}}
with only one insert inside it, it runs successfully
THANKS for the help!