flite
is a SQLite extension and command line utility for working with local data files.
It's meant to work in tandem with built-in functionality such as the SQLite JSON1 extension.
flite
can be compiled to a shared library and be loaded as a SQLite runtime extension.
Run make
and the shared library will available be at ./build/flite.so
.
make
will also produce a binary at ./build/flite
.
split
is an eponoymous-only virtual table (table-valued-function) that reads a file from disk (or stdin if no file is specified) and splits it into rows by a delimiter (defaults to \n
).
SELECT * FROM split("/path/to/some/file.ndjson")
file_read
is a scalar function that returns the contents of a file (path provided as an argument).
If no path is supplied, it reads from stdin.
SELECT file_read("/path/to/file.json")
yaml_to_json
is a scalar function that expects a single argument (a YAML string) and returns it as a JSON string (which can be used in the built-in JSON methods)
SELECT yaml_to_json("hello: world")
-- {"hello":"world"}
json_to_yaml
is a scalar function that expects a single argument (a JSON string) and returns it as a YAML string.
SELECT json_to_yaml('{"hello":"world"}')
-- hello: world