Req: Noob guide to extract data to csv or dbase

Hi,

I've searched the forum + google for hours but can't find a small noob guide how to set the local api to export data to my local dbase / csv file.
I've read the manual but unfortunately this doesn't make a lot of sense to me.
I have a flukso v2 + synology ds412+ running and would like to have the data streamed in a CSV or dbase file I can read out afterwards.

Is there some sort of Noob guide out there that could explain all the steps to me or if someone is willing to take up the challenge?
I'm not IT challenged but more of a ITPRO than a DEV :)

Any pointers to get me in the right direction are highly appreciated.

gebhardm's picture

I am currently working on such a little script, but actually am fiddling with some http issues (IncompleteRead errors...); I am doing this with python on a Raspberry Pi but the same concept should work also with a PHP-script on the Synology drive as long as you can start it; csv-export from a db is "just" a SELECT away (see below code snippet, assuming the table to read is named flmdata)...

  1. SELECT * FROM flmdata
  2. INTO OUTFILE './flmdata.csv'
  3. FIELDS TERMINATED BY ','
  4. ENCLOSED BY '"'
  5. LINES TERMINATED BY '\n'

See https://github.com/gebhardm/energyhacks/tree/master/RaspberryPi for own inspiration...
Regards, Markus (G**gle is my and your friend when you know to ask the right question ;-))