GlareDB CLI

Install

GlareDB can be installed in the current working directory with a simple one-line command:

curl https://glaredb.com/install.sh | sh

Update

To update GlareDB, simply re-run the Install. The install works in the current working directory and will replace/overwrite existing installations.

Basic usage

To start a local session, run:

./glaredb

This will drop you into a shell letting you run sql commands against GlareDB. Note that by default, this will use an in-memory database.

GlareDB
Type \help for help.
Using in-memory catalog
> select 'hello glaredb';
┌───────────────────────┐
│ Utf8("hello glaredb") │
│ ──                    │
│ Utf8                  │
╞═══════════════════════╡
│ hello glaredb         │
└───────────────────────┘

An optional --data-dir argument can be provided which will persist the database at the provided path.

./glaredb --data-dir ./example

The \open command can be used in a running shell to open a database at the provided path:

> \open ./example

The \open command can also be used to connect to a GlareDB Cloud deployment.

> \open glaredb://<user>:<password>@<org>.remote.glaredb.com:6443/<deployment-name>
Connected to Cloud deployment: <deployment-name>

Connecting to a Cloud deployment via the CLI enables Hybrid execution which allows queries to use the resources of both the remote deployment and local machine.

Server usage

Alternatively, the server subcommand can be used to launch a server process on port 6543:

./glaredb server

To see all options available, run --help:

./glaredb server --help

The server can then be connected with a Postgres-compatible client, for example psql:

psql "host=localhost user=glaredb dbname=glaredb port=6543"

Connecting to a local server with other programming languages

You can connect to a GlareDB server running locally (or remotely) with your programming language of choice.

The GlareDB Repository has the following examples:

Using GlareDB’s python bindings

GlareDB has specific bindings for Python that allow for interop with data processing libraries like Polars and Pandas. For more information, see the following: