|
An SQLite dump is human readable and the data in the dump actually is in a CSV format, just surrounded with information on types and relationships. Here's the first few lines for example of a dump of an SQLite DB that I have of some temperature sensor data: PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE temperature
(
ts integer,
Tc real,
Tf real,
src_id integer
);
INSERT INTO temperature VALUES(1615165342,5.5999999999999996447,42.099999999999999644,1);
INSERT INTO temperature VALUES(1615165350,0.6,32.999999999999998223,3);
INSERT INTO temperature VALUES(1615165404,5.5,41.899999999999995026,1);
INSERT INTO temperature VALUES(1615165410,-17.199999999999999289,1.0,2);
INSERT INTO temperature VALUES(1615165435,5.5,41.899999999999995026,1);
SQLite dumps would actually be a pretty good data exchange format. As mentioned there is a CSV inside there. It's not hard to extract that if you need an unadorned CSV--some grep and sed, or grep and cut, or a few lines of scripting.Or if you have SQLite installed, it is an easy to have SQLite itself read the dump and export it in CSV, letting it deal with things like quoting that can be a pain with grep and sed/cut. This way also makes it easy to rearrange or omit columns and to do some filtering so that data you don't care about doesn't get into the CSV. |