Settings

Theme

Show HN: SQL Generator – OS React App for SQL Table/Insert Statement Generation

github.com

12 points by ryanwaldorf 2 years ago · 5 comments · 1 min read

Reader

This open-source app lets you convert spreadsheet files (e.g. CSV/excel), JSON files, or pasted data to SQL in-clauses or CREATE TABLE/INSERT INTO TABLE combinations. Let's you easily move data into your warehouse for ad hoc analyses. All processing is client-side so your data stays with you. I have it hosted at sqlgenerator.io but you can also clone it and self-host it for security with your own internal applications.

memset 2 years ago

Can you share an example on how to use it? For example, start with some example data as the input?

  • ryanwaldorfOP 2 years ago

    You can download one of the NZ government's Annual Enterprise Surveys here: https://www.stats.govt.nz/large-datasets/csv-files-for-downl.... Then simply go to the Excel to SQL tab (https://sqlgenerator.io/#/sql-converter/excel-to-sql) and press upload file. It will generate SQL CREATE TABLE and INSERT INTO TABLE statements for you. You can then download it as a file or simply copy and paste it into your query editor.

    Additionally, if you want to make any changes like including only certain columns or changing column types/names you can do that via the inputs below the generated SQL. Any changes you make are immediately reflected in the SQL generated.

YuxiaoZ 2 years ago

Really cool app! Thanks for sharing this Ryan and excited to try it out.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection