Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I'm trying to fetch data from PostgreSQL database.
Query,
select
entry_timestamp + interval '30 minutes' as offset_timestamp,
entry_timestamp
from
sensor_data
I'm trying to pass 30 minutes from Thingworx input.
select
entry_timestamp + interval '<dynamic>' as offset_timestamp,
entry_timestamp
from
sensor_data
How to do that?
Solved! Go to Solution.
You can try something like this. Just pass the whole '30 minutes' (with a single quote) as input to the service
You can try something like this. Just pass the whole '30 minutes' (with a single quote) as input to the service
Thanks @Velkumar
select
entry_timestamp + make_interval(mins => <<offset_interval>>) as offset_timestamp,
entry_timestamp
from
sensor_data
Got a expected output with above code. offset_interval (Ex. 30) is passing from ThingWorx service.
Below one also working as expected,
select
entry_timestamp + <<offset_interval>> as offset_timestamp,
entry_timestamp
from sensor_data
offset_interval (Ex. interval '30 minutes') is passing from ThingWorx service.