Using GlareDB in Hyperquery

Hyperquery is a data notebook built for speed, visibility, and collaboration. Hyperquery provides the ability to write and execute SQL queries or Python cells directly within a rich graphical interface.

Running GlareDB in Hyperquery

To get started, select an existing notebook, or create a new one.

To install GlareDB in the notebook type /, then select Python block. This will place a new block for executing python in the notebook, which will be used to to install the glaredb python library.

python block

Execute the following command in the code block:

pip install glaredb

Next, in a new Python block, import and use glaredb:

import glaredb

con = glaredb.connect()
con.sql("SELECT 'hello from hyperquery';").to_pandas()

Pandas is in scope. GlareDB provides interop with both Pandas and Polars dataframe libraries. For more information, refer to GlareDB Python documentation.

Executing SELECT 'hello from hyperquery'; will produce output like:


Connecting to GlareDB Cloud from Hyperquery

Sign in or sign up with GlareDB Cloud. Upon signing up, a free deployment is instantly created and ready to be used. Obtain the Python connection details for a deployment by clicking the Connect button and selecting the Python tab.

connect button

connect python

In a Python block, use the connection URI when calling glaredb.connect:

import glaredb

cloud_uri = "glaredb://"

con = glaredb.connect(cloud_uri)

Hyperquery has access to all of the resources in the GlareDB Cloud deployment through Hybrid Execution. Data in the notebook, including Pandas and Polars dataframes can be joined with data in GlareDB Cloud.