https://github.com/wvlet/querybase-legacy
Database for queries
https://github.com/wvlet/querybase-legacy
Last synced: 3 months ago
JSON representation
Database for queries
- Host: GitHub
- URL: https://github.com/wvlet/querybase-legacy
- Owner: wvlet
- License: apache-2.0
- Created: 2020-06-24T06:08:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-15T20:09:57.000Z (over 2 years ago)
- Last Synced: 2025-05-31T20:05:23.660Z (4 months ago)
- Language: Scala
- Homepage:
- Size: 900 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Querybase
Database for queries.
## Roadmap
- Interactive query editor
- Reuse SQL queries as functions
- Referencing and parameterization
- Collect, analyze, and visualize query logs
- Define query-engine agonistic IR for analyzing logs
- Reporting
- Summarizing query usage
- Tracking lineage of data flows## Quick Start
```sh
// Set up Node.js and jsdom
$ brew install node npm
$ npm install jsdom# Install querybase to ~/local/bin/querybase
$ ./sbt packInstall
```Add service settings (for using Treasure Data):
__.querybase/services.json__
```json
{
"services": [
{
"serviceType": "trino",
"name": "td (US)",
"description": "td-presto US region",
"properties": {
"address": "api-presto.treasuredata.com:443",
"connector": "td-presto",
"user": "(TD API KEY)"
}
},
{
"serviceType": "trino",
"name": "td (JP)",
"description": "td-presto Tokyo region",
"properties": {
"address": "api-presto.treasuredata.co.jp:443",
"connector": "td-presto",
"user": "(TD API KEY)"
}
}
]
}```
Launch a standalone server at localhost:8080
```sh
$ ~/local/bin/querybase standalone
```Open http://localhost:8080/
## For Developers
Run querybase server:
```
$ ./sbt
> ~server/reStart standalone
```Build Scala.js UI:
```
// Set up Node.js and jsdom
$ brew install node
$ npm install jsdom// Build UI (Scala.js -> JavaScript)
$ ./sbt
> ~ui/fastOptJS/webpack
```Open http://localhost:8080/ui/
If you use [Browsersync](https://browsersync.io/), the UI will be reloaded automatically upon Scala.js change:
```
# Install Browsersync
$ npm -g install browser-sync# Start a proxy server at http://localhost:3000/ui/ that watches Scala.js code change.
$ browser-sync start --proxy http://localhost:8080/ui/ --files querybase-ui/target/scala-2.13/scalajs-bundler/main
```