Number of row from stream between two date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Number of row from stream between two date
Hi All,
I need a service that return the number of row contained into stream between two date (StartDate and EndDate).
The service must return only the number of rows.
If that does not exist is it possibile to create it ? How ?
Mnay Thanks
BR
Dimitri
- Labels:
-
Design
- Tags:
- thingworx 8.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It doesn't exists actually, you have to query it, and just get result.rows.length
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Carles,
I know the service like QueryStreamEntries or QueryStreamData but they need more time to returned this value. They need 32 sec to return a value of 249567 row.
Is it possible to create a new service ?
BR
Dimitri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
When you mean a new Service, what does you mean?
I mean, you can create a custom service that does the QueryStreamEntries and result.rows.length and just return the value, but yes for 300k Rows it will be super slow.
I suppose that you mean creating a service that access the database directly and does the select count(*) where query_condition --> Short answer, not out of the box, long answer, yes you can connect directly to the PostgresSQL database ( if you are on this bdd storage ) and look on internal database structure to do the job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Carles,
I need a service that access to the database directly or a new service inside the Thingwox (like GetStreamEntryCount with a condition).
Could be possible to require this new feature to Developer Team of Thingworx ?
BR
Dimitri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes you can ask for the new feature for sure, but wait seated
