cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Number of row from stream between two date

Highlighted
Newbie

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

Tags (1)
5 REPLIES 5

Re: Number of row from stream between two date

It doesn't exists actually, you have to query it, and just get result.rows.length

Re: Number of row from stream between two date

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

Re: Number of row from stream between two date

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.

Re: Number of row from stream between two date

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

Re: Number of row from stream between two date

Yes you can ask for the new feature for sure, but wait seated