Is there any reason you could not just use sqlite's own consolidation
functions...
create temporary table cons5min as
select max(dateTime) as dateTime,
usUnits, 5 as interval,
avg(barometer) as barometer,
avg(inTemp) as inTemp,
<all the other data>
from archive
where interval = 1
group by (dateTime-60) / 300 ;
choosing appropriate functions, such as max for windgust
then delete the lines with interval=1
and
insert into archive select * from cons5min;
On Wednesday, 16 October 2019 08:10:21 UTC+10, Pat wrote:
>
> Back when I started with weewx in 2015 I had a 1 minute archive interval.
> I kept it that way for a few months until I realized more in how the
> archive interval works.
>
> I am performing some wee_import functions to get calc_missing on some
> records. wee_import warns about the mismatch in the intervals, which got me
> thinking:
>
> Is it possible to consolidate all my "1" interval to match the rest of my
> database at 5 minute intervals?
>
--
You received this message because you are subscribed to the Google Groups
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-development/8fc3a53f-8aab-4663-a375-2ae308fd99e2%40googlegroups.com.