← Back to Glossary

Hex

Hex is a cloud-based notebook platform that combines SQL, Python, R, and no-code cells for data analysis, and for publishing the results as interactive apps and dashboards.

Overview

Hex is a collaborative notebook environment aimed at data teams who want to move between exploratory analysis and polished, shareable output without switching tools. A Hex "project" is a notebook that mixes SQL cells, Python or R cells, and no-code input cells (dropdowns, date pickers, text inputs), which can then be published as an interactive data app for non-technical stakeholders, alongside more traditional scheduled reports and dashboards.

How SQL cells work

Every SQL cell in Hex has a built-in DuckDB-powered SQL IDE. A SQL cell can query two kinds of sources: a connected data warehouse (Snowflake, BigQuery, Postgres, and others), where the query is pushed down and executed remotely, or an in-memory dataframe already loaded into the notebook's Python kernel, in which case Hex uses DuckDB to run the SQL directly against that dataframe. That second mode lets an analyst write plain DuckDB-dialect SQL against a pandas or Polars dataframe mid-notebook, without exporting it to a table first.

Copy code

-- SQL cell querying a dataframe already in the notebook select category, avg(order_total) as avg_order_value from orders_df group by category order by avg_order_value desc

Results can be returned either as a new dataframe stored in the notebook (useful for chaining further transformations without re-hitting the source) or left as a live query against the warehouse for very large results.

Hex and MotherDuck

Hex also integrates directly with MotherDuck as a data source, so a notebook can combine cloud-hosted DuckDB tables with local dataframe analysis and Python-based modeling in the same project, then publish the result as a shareable app.

Related terms

FAQS

Hex offers a free tier for individuals and small use cases, with paid team and enterprise plans for larger organizations, added governance, and higher usage limits.

Yes. Every SQL cell in Hex includes a DuckDB-powered SQL IDE, and DuckDB is used to run SQL directly against in-memory dataframes inside a notebook.

Yes, Hex has a direct MotherDuck integration, allowing a notebook to query cloud-hosted DuckDB data alongside local dataframes and Python code.