Skip to content

wvlet/querybase-legacy

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8a2e862 · Jun 14, 2023
Dec 31, 2022
Oct 24, 2020
Jun 14, 2023
Sep 20, 2021
Oct 21, 2022
Aug 19, 2021
Aug 19, 2021
Oct 20, 2022
Oct 20, 2022
Oct 20, 2022
Apr 1, 2023
Apr 10, 2021
Jun 24, 2020
Oct 21, 2022
Apr 1, 2023
Oct 20, 2022

Repository files navigation

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

// 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

{
  "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

$ ~/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, 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