jinnabaalu / ScratchDB

Automatic setup for analytics data

Home Page:https://www.scratchdb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScratchDB

ScratchDB is a wrapper around Clickhouse 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 ingest
$ go run scratch insert

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

https://www.scratchdb.com

License:GNU Affero General Public License v3.0


Languages

Language:Go 100.0%