Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

No longer receiving results from "data-query __Statistics__" command


Erryosia Dec 31, 2012 07:04 AM

Hi all,

Am new on here and have done a quick search but can't quite find an answer to the issue I am having.

We have numerous stations connected (100+, actually) and was looking at analysing performance statistics (to identify/analyse connection issues).

So, I jumped onto CoraScript with SDK on hand and on my first attempt, I ran the "data-query" command on the "__Statistics__" table for a number of stations of interest for that current day and got my required output, e.g.

===Start of output===
CoraScript 1, 8, 4
+connect,"coralib3.dll version 1, 3, 17, 44 Beta"
*data-query,"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist"
{
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:00:00.027","345","Attempts","DECIMAL(10,0)","16","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","4"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:10:00.023","346","Attempts","DECIMAL(10,0)","11","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","3"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:20:00.035","347","Attempts","DECIMAL(10,0)","7","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","0"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:30:00.031","348","Attempts","DECIMAL(10,0)","8","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","0"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:40:00.027","349","Attempts","DECIMAL(10,0)","16","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","0"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 20:50:00.023","350","Attempts","DECIMAL(10,0)","8","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","0"
"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist","2012-10-31 21:00:00.018","351","Attempts","DECIMAL(10,0)","8","Retries","DECIMAL(10,0)","0","Failures","DECIMAL(10,0)","0"
...etc...[remainder snipped]
}
+data-query
===End of output===


Things were looking good when I first ran this (a number of weeks ago), but when I have returned back on the server ever since and re-run the same query (updated with the current date), I no longer get any output!?


The following commands are entered:
"
connect localhost;
data-query __Statistics__ SWM_BMA_0046_Bee_Creek_Downstream_hist 20121231 20121231;
data-query __Statistics__ SWM_BMA_0046_Bee_Creek_Downstream_std 20121231 20121231;
quit;
"

...with the output of the above commands being:

"
CoraScript 1, 8, 4
+connect,"coralib3.dll version 1, 3, 17, 44 Beta"
*data-query,"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_hist"
{
}
+data-query
*data-query,"__Statistics__","SWM_BMA_0046_Bee_Creek_Downstream_std"
{
}
+data-query
"


Additional info:
- Loggernet version is 4.1
- Collection of data (at 10 minute intervals) is occurring as expected/normal
- The date used in my query is always the current date (since there is only supposed to be the last 24 hours worth of data)
- I have checked all the other stations connected and they are all producing the same (lack of) output, i.e. this observation is not isolated to the one I have mentioned above.

Any ideas on what may have changed - or something simple that I may have overlooked?


Thanks in advance - and wishing everyone all the best in the New Year!

Kind regards,

Peter


jtrauntvein Dec 31, 2012 04:02 PM

The help for the data-query command states that the time stamps for the data are expressed as a half-open interval. This means that the data returned will be the data that has a time stamp that is greater than or equal to the begin date and less than the end date. Since the two dates that you specified are equal, the returned results are an empty set.

I would try a command such as the following:

data-query __statistics__ cr1000_hist 20121231 20130101;


Erryosia Jan 1, 2013 01:08 AM

Bingo! Yup, that was it - looks like I had forgotten that I used different dates during my original attempt(s) that had worked.

By tweaking the dates, I am now seeing the intended output from the StationName_hist and StationName_std data-query commands.

Thanks for the prompt reply - much appreciated.

Kind regards,

Peter

Log in or register to post/reply in the forum.