On Mon, Sep 29, 2014 at 05:22:46PM +0100, Chris Green wrote:
On Mon, Sep 29, 2014 at 04:54:48PM +0100, Mark Rogers wrote:
On 29 September 2014 14:25, Chris Green cl@isbd.net wrote:
'2014-09-29 15:05', 22.125, 22.75, 13.6285714286, 13.8876923077, 34.36875,
0.253125, 14.85, 8.803125, 8
Silly question, but since this is just CSV data, why not stick with it but put a header line above it listing the fields?
Not a silly question at all, I could very easily do as you say and it seems at first glance to be a good solution.
Is there any easy *programmatic* way to do an SQL insert from a CSV with headings?
I've come up with an even simpler and more obvious solution.
The data I'm collecting isn't huge, there's about 700kBytes at the moment which is from the last couple of years (with gaps). I can simply do everything at the remote end on the Beaglebone Black and rsync the database across at intervals. The BBB is a newer one with a 4Gb emmc, currently it's 44% full so there's a couple of Gb to spare still, quite a few years' data!
So my programs which gather the data on the BBB will simply write it directly to a sqlite3 database, all the configuration (like names for ADC channels) can live in the database.
It will probably be a good idea to have some sort of historical backup when rsyncing the database across to home so that if it gets scrambled on the BBB I don't lose all my old data.