Using Query parameters in WEB API connector for timeseries data SQL Query contents

Hi,
I’m trying to connect to a timeseries database using WEB API.
The TS DB should get a SQL query in the request body according to which a response is provided formed as a JSON.

When I use actual values (timestamps) in my SQL query the query goes through and I can see data coming in but when I use query parameters for parameterizing my start & end times I cannot seem to get the parameters values passed through>>>




.

I’ve attached a few screenshots. Most likely I’m not using appropriate syntax. Will appreciate any guidance.

thanks

You were so close!

You just need another dollar sign. Parameters use it on both sides

Where ts between $start_time$ and $end_time$ should work.

Alternatively try WHERE ts BETWEWN '$start_time$' and '$end_time$' in case your DB has an easier time processing the values as strings.

3 Likes

A friend in need is a friend indeed !
It works great now.
Thank you very much Daniel ! :slightly_smiling_face:

2 Likes