Skip to content
Advertisement

InfluxDB placeholder “Empty bound parameter”

I’m struggling to format a InfluxDB query using placeholders.

Here I query with multiple placeholders. The values are defined in the placeholders object, as seen below,

Once sent, an error 400 - error parsing query: empty bound parameter

In the error I can see the GET request, where it appears that the Influx library has correctly formatted the placeholders under “params”.

How do I correctly format my query?

Advertisement

Answer

Have you tried changing

TO

The difference is that you reference the Placeholders or bind parameters using $variable_name instead of $<variable_name>. Assuming you’re using node_influx, you can remove the double quotes on your tags and it’ll still work.

I used this PR as reference https://github.com/node-influx/node-influx/issues/587

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement