/tmp % echo "id,age,weight\n1,3,2.5\n2,," | sqlite-utils insert test.db test - --csv
/tmp % sqlite-utils schema test.db
CREATE TABLE [test] (
[id] TEXT,
[age] TEXT,
[weight] TEXT
);
/tmp % sqlite-utils transform test.db test --type age integer --type weight float
/tmp % sqlite-utils schema test.db
CREATE TABLE "test" (
[id] TEXT,
[age] INTEGER,
[weight] FLOAT
);
/tmp % sqlite-utils rows test.db test
[{"id": "1", "age": 3, "weight": 2.5},
{"id": "2", "age": "", "weight": ""}]
{"id": "2", "age": null, "weight": null}
It would be neat if this resulted in the following instead:
Related Discord discussion: https://discord.com/channels/823971286308356157/823971286941302908/1019635490833567794