datawan-labs / pg

In Browser PostgreSQL Playground, no server, just client and pglite (postgresql wasm)
https://pg.datawan.id
MIT License
315 stars 14 forks source link

[NEW FEATURE] - Data Importer #6

Open JfrAziz opened 2 months ago

JfrAziz commented 2 months ago

we want to develop new feature to import raw data, like excel, csv, or maybe parquet to postgresql. and here the design that I think match to this project (if you have another approach, let me know).

  1. first we need multi data source importer, this will import any data source like csv, excel, or another format to javascript object, the data and the column information. we can add more source as long we can import it to same format.
  2. then with that data and column information, we can build simple DDL and DML to create query to create the table also insert all rows to new table.
  3. run query

Design

this just simple design, in the UI we can add features like raw data viewer, query and column editor before import the data.

reference

aadrian commented 4 weeks ago

@JfrAziz by just using https://www.papaparse.com/ , the first two steps are already solved ("raw data importer", and "data/json + column identification" ) - see the examples there.