Skip to content

Scratch is an open-source alternative to BigQuery, Redshift, and Snowflake. Runs on Clickhouse.

License

Notifications You must be signed in to change notification settings

cjtim/ScratchDB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:https://localhost:3000/data \
    -H 'Content-Type: application/json' \
    -d '{"table":"my_table","data":{"fruit": "apple"}}'

3. Query

To view data in JSON format:

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

To view data in an HTML table:

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

About

Scratch is an open-source alternative to BigQuery, Redshift, and Snowflake. Runs on Clickhouse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%