Skip to content

boiledice/ScratchDB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScratchDB

ScratchDB is a wrapper around duckdb that lets you input arbitrary JSON and perform analytical queries against it. It automatically creates tables and columns when new data is added.

Quickstart

1. Run the server

$ go run scratch test.db

2. Insert JSON data

$ curl -X POST http://localhost:3000/data \
    -H 'Content-Type: application/json' \
    -d '{"table":"my_table","data":{"fruit": "apple"}}'

3. Query

To view data in JSON format:

http://localhost:3000/query?q=select * from my_table

To view data in an HTML table:

http://localhost:3000/query?format=html&q=select * from my_table

About

Automatic setup for analytics data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%