This is great! I use MySQL primarily as my source, but frequently flip/flop for testing various things. I can export the 20,000 rows to SQLite, run this then import the new rows back to MySQL. Thanks!
On Wednesday, October 16, 2019 at 9:09:26 PM UTC-4, Cameron D wrote: > > 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/003757b5-bf5b-45d1-b218-a21e81db650f%40googlegroups.com.
