3 ms·
Probably expands the API too much, but one missed use case I just ran into would be a .import function for loading a json list of records or jsonl directly into
by fbdab103 3y ago
Probably expands the API too much, but one missed use case I just ran into would be a .import function for loading a json list of records or jsonl directly into a table from the command line. This can be roughly replicated through readfile and some juggling, but will not work from stdin (I think? I would love to pipe json directly into a table).
The other alternative I considered was dumping the entire json blob into a one row table, before having a second query extract out the fields.
- simonw 3y agoMy sqlite-utils tool can pipe JSON directly into a SQLite table, creating a table with the right schema if it doesn't exist yet: https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-json-data https://sqlite-utils.datasette.io/en/stable/cli.html#inserti...
- LikesPwsh 3y agoThat project looks great. The MSSQL equivalent would be DbaTools, in case anyone is looking. https://docs.dbatools.io/Write-DbaDbTableData.html https://docs.dbatools.io/Write-DbaDbTableData.html