lana-k / sqliteviz

Instant offline SQL-powered data visualisation in your browser
https://sqliteviz.com
Apache License 2.0
2.15k stars 118 forks source link

[RFE] JSON file import (multiple) #61

Open saaj opened 3 years ago

saaj commented 3 years ago

(original idea from #56)

As a user of sqliteviz, In order to import data whose machine-readable representation is only available in JSON, I want to be able to import JSON files in sqliteviz.

Abstract

  1. JSON is ubiquitous. Some Linux tools, for instance smemstat, only have JSON as a machine-readable output format option.
  2. JSON1 and recursive CTEs (both are out-of-the-box in sql.js) are sufficient for most cases of extracting data from JSON document(s) and JOINing them with other tables.

JSON file import UI

  1. Similar UI as for CSV.
  2. User should be able to provide a table name.
  3. The schema for the table is always like CREATE TABLE user_provided(id INT, filename TEXT, document TEXT).
  4. In the file dialogue multiple JSON file selection is possible.
  5. Single JSON file/document produces single row.