Time Series Query - Possible to Limit Decimal Places?

Hello,

Is it possible to limit the number of decimal places in a Time Series Query using the Losant API node? Our devices are reporting measurements with just a few decimal places, but the mean received has 15 decimal places (assumedly because it is the average of a lot of measurements). I haven’t seen anything in the documentation, but I thought I would check here in case I missed something.

The reason this is important for us is because for 2 of our workflows we are requesting a large number of data points and with all the decimal places we are hitting the 5MB Workflow Payload Maximum. What is especially confusing is that we are inconsistently hitting this maximum between various sets of measurement data (due to fluctuations in the number of decimal places). As such it has been challenging to navigate a solution for this.

Thanks,

April Jang

In case this is brought up, we have tested using the Data:Time Series Node and have determined that it has a similar decimal place issue. Additionally, the output format of this node is actually much larger than using the Losant API for our current setup, so it is not a good option.

There’s nothing built into the API or the native data nodes to handle decimal formatting, but I will file a feature request for this.

At what point is the workflow failing due to the size limit? Is it that the Losant API Node / the Data: Time Series Node is throwing an exception and not returning a result? Or is there some node downstream from there where you are hitting the size limit?

Thanks for letting me know and noting a feature request for it.

The issue is that there is a function node downstream that is used to process the data that is triggering the size limit error. Based on testing, trying to define any variables (to the payload or otherwise) triggers the error.

Some time ago we released a feature for the Function Node that allows you to define the scope of the payload that you are operating on; I feel like this would work well for your case. If you can pass in a payload path to only the portion of the payload you are operating on - or, if operating on multiple parts, one Function Node per scoped portion - that might work.