sparkfun / phant

the data logging engine behind data.sparkfun.com
700 stars 99 forks source link

Sorting data? #128

Closed liudr closed 6 years ago

liudr commented 9 years ago

Is there any way to sort data say in increasing order of a particular column? Background: I am working on extracting data within a certain date range for download. I was successful with the gte[index]=xxx and lte[index]=xxx filters. I was able to get data that are within a range of my time stamp (not upload but data collection stamps, could differ if logger temporarily loses internet connection, pretty often if it rains and cloud moves in to block cell signal).

The output was exactly what I asked for, except for order is reversed, with most recent data in the front. I would like to request a sort option so that the output data are sorted according to increasing or decreasing order of a certain column, after the filters have been applied. This would be awesome! Thank you!

toddtreece commented 9 years ago

This is possible, but I'm not going to promise anything. The storage modules, especially the file based ones like CSV and JSON, make it hard to change the sort order. All of the results would need to be buffered and sorted in code for those types of storage. Sorting in the storage modules that are backed by real databases is a lot easier and faster, but I would need to make sure that sorting worked for all storage modules to implement the feature.

liudr commented 9 years ago

Thanks! This is not a big issue. I was only asking to see if it would be easy to implement on the server side. I can use excel or open office calc to sort the data once I get them.

bboyho commented 6 years ago

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and will be discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post [ https://www.sparkfun.com/news/2413 ] on the topic for an overview and helpful links for each platform.