Getting started
There are three easy ways to get started with Sneller:
To send a query to Sneller, you can either use curl or check out these example programs (using just plain HTTP calls).
Open source
If you have an AVX-512-capable CPU, you can download the Sneller source code and run the query engine locally. The Sneller query engine is available under the AGPL-3.0 license. Our README
describes how to get started with the sdb
tool, which you can install easily via go install
:
$ go install github.com/SnellerInc/sneller/cmd/sdb@latest
Note that an AVX-512-capable CPU is required in order to run queries.
If you don’t have the appropriate hardware to run sdb
locally, you should try the Playground or Sneller Cloud instead.
Playground
The playground hosted on this website is the quickest way to try out Sneller.
Our playground has a pre-loaded table containing one billion records (originally about 5TB worth of JSON) from the GitHub archive data set. Users can query this table for free in order to test out Sneller’s functionality.
In addition, it is easy to experiment with your own data by either:
- uploading one or more files of JSON data
- copy-pasting one or more presigned S3 URLs
Once your data is uploaded, a temporary table is created, and you can query either directly using the playground or via curl
or a simple sample program.
Important note: any data that is uploaded will be automatically deleted after 2 days. Do not use the playground to store sensitive or confidential data.
Curl access
You can invoke Sneller simply via curl
, for example:
curl -H 'accept: application/json' 'https://play.sneller.ai/query?database=demo' \
--data-raw $'SELECT DISTINCT repo.name FROM gha WHERE repo.name LIKE \'torvalds/%\'' | jq
[
{
"name": "torvalds/linux"
},
{
"name": "torvalds/libdc-for-dirk"
},
{
"name": "torvalds/uemacs"
},
{
"name": "torvalds/test-tlb"
},
{
"name": "torvalds/pesconvert"
},
{
"name": "torvalds/subsurface-for-dirk"
}
]
The playground has a “curl” button that generates the command automatically.
Sneller Cloud endpoints require the Authorization
HTTP header to contain a valid bearer token,
but the play.sneller.ai
endpoint does not.
Code examples
Sneller does not require the use of any SDK (Software Development Kit).
As illustrated in the examples below, you can execute queries with a simple HTTP POST
request from the HTTP client of your choice.
Every example program below sends a SQL query to the ‘gha’ table of the ‘demo’ database which is running in Sneller’s playground.
- shell
- go
- c#
- js
The example program above should output the following JSON data:
[{"name": "torvalds/linux"},{"name": "torvalds/libdc-for-dirk"},{"name": "torvalds/uemacs"},{"name": "torvalds/test-tlb"},{"name": "torvalds/pesconvert"},{"name": "torvalds/subsurface-for-dirk"}]