Page 1 of 1

Database export [rain0total-sumXX] not working **solved**

Posted: Wed Mar 09, 2016 2:31 pm
by frogfoot
Hi,
I'm trying to export rain totals to a file which I can use to manually update a database, I want to get hourly totals but I cant get any data out using [rain0total-sum60] (as described in the Templates page of the Wiki)

my tamplate is as follows

UPDATE meteo.alldata SET RHr =[rain0total-sum60:] where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '[YYYY]-[MM]-[DD] [hh]:[mm]';

and I run the 'Export month in hours' option however I get the following result...

UPDATE meteo.alldata SET RHr = where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '2016-03-01 00:00';
UPDATE meteo.alldata SET RHr = where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '2016-03-01 01:00';
UPDATE meteo.alldata SET RHr = where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '2016-03-01 02:00';
UPDATE meteo.alldata SET RHr = where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '2016-03-01 03:00';
UPDATE meteo.alldata SET RHr = where CONVERT(cast(dateTime as CHARACTER(16)),DateTime)= '2016-03-01 04:00';
...
...

as you can see there is no values for [rain0total-sum60:] even though we have had a load of rain and the meteobridge pro database shows accumulated rainfall for the specified period.
I hope you can help
Tom

Re: Database export [rain0total-sumXX] not working

Posted: Thu Mar 10, 2016 1:35 am
by admin
Export function just grabs data from the database and does not perform any summing up over a user defined period.
By selecting the time resolution "in hours" it is fixed that hourly data is used. When you say [rain0total-sum] you
should be fine.

Re: Database export [rain0total-sumXX] not working

Posted: Thu Mar 10, 2016 2:16 am
by frogfoot
Thanks, now I understand!

Would it be possible to have export in 5 min chunks added at some point ( or even better a user defined time) in addition to per day, per hour and per minute as my database stores data at 5 minute intervals, having the possibility to export historic data in those timeslices would be very useful

Re: Database export [rain0total-sumXX] not working **solved

Posted: Thu Mar 10, 2016 10:48 pm
by admin
This will add even more complexity to the MB PRO. I am just fighting to
get all the bugs out and therefore, I am reluctant to implement even more complicated
special features. I would recommend that you aggregate data on your side.
MB PRO can deliver down to per minute data.