GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - scratchdata/scratchdata: Scratch is a swiss army knife for big data.

BranchesTags
Open more actions menu

Latest commit

 

History

245 Commits
245 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
models
models
 
 
pkg
pkg
 
 
.gitignore
.gitignore
 
 
.goreleaser.yaml
.goreleaser.yaml
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
config.yaml
config.yaml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
readme.md
readme.md
 
 

Repository files navigation

Scratch Data

Scratch Data is a wrapper that lets you stream data into and out of your analytics database. It takes arbitrary JSON as input and lets you perform analytical queries.

Quickstart

1. Run the server

Clone the repo:

$ git clone [email protected]:scratchdata/scratchdata.git
$ cd scratchdata

Start the service:

$ go run . 

With no configuration, this will automatically set up a local DuckDB database ready for reading and writing.

Run with custom config

Create a config.yaml file with all of your settings and run:

$ go run . config.yaml

2. Insert JSON data

$ curl -X POST "http://localhost:8080/api/data/insert/events?api_key=local" \
    --data '{"user": "alice", "event": "click"}'

The "events" table and columns are automatically created.

3. Query

curl -G "http://localhost:8080/api/data/query" \
     --data-urlencode "api_key=local" \
     --data-urlencode "query=select * from events" 

Other Features

Share Data

You can share data as CSV or JSON by creating "share links".

$ curl -X POST "http://localhost:8080/api/data/query/share?api_key=local" \
    --data '{"query": "select * from events", "duration": 120}'

This will produce a query ID that expires in 120 seconds. From there, send the following link to users:

http://localhost:8080/share/<query_id>/data.csv
http://localhost:8080/share/<query_id>/data.json

Copy Data

You can set up multiple databases and copy data between them. You can run a SQL query against your source database and Scratch will automatically create a table and insert data into a destination.

$ curl -X POST "http://localhost:8080/api/data/copy?api_key=local" \
    --data '{"query": "select * from events", "destination_id": 3, "destination_table": "events"}'

Next Steps

To see the full list of options, look at: https://docs.scratchdata.com

About

Scratch is a swiss army knife for big data.

www.scratchdata.com

Topics

bigqueryclickhousedata-warehouseduckdbhacktoberfestmotherduckolapredshiftsnowflake

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

1.1k stars

Watchers

4 watching

Forks

54 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.