Data manipulation panel

When working with the data manipulation panel I have the syntax error in mysql. I actually don’t know where the problem is, since all the steps indicated have been followed.
the grafana version is 10.1
the panel version is 3.7 please help

{“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 ‘{id} where CONTENEDOR=payload.CONTENEDOR’ at line 1”,“status”:500,“frames”:[{“schema”:{“refId”:“A”,“meta”:{“typeVersion”:[0,0],“executedQueryString”:"update infinity set ESTADO_AUD=${id} where CONTENEDOR=payload.CONTENEDOR "},“fields”:},“data”:{“values”:}}]}}},“config”:{“method”:“POST”,“url”:“api/ds/query”,“data”:{“queries”:[{“datasourceId”:17,“refId”:“A”,“rawSql”:"update infinity set ESTADO_AUD=${id} where CONTENEDOR=payload.CONTENEDOR ",“format”:“table”}]},“retry”:0,“headers”:{“X-Grafana-Org-Id”:6},“hideFromInspector”:false}}

can you show your mysql query?

1 Like

@edisonmanjarres You may need to add quotes for the '${id}'. Replace variables logic we use in the Data Manipulation can be slightly different than the one you use in the Query Editor, which has additional magic for each data source.