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
Marimo is an open-source reactive Python notebook, stored as plain .py files, with native SQL cells backed by DuckDB by default.
MotherDuck →MotherDuck is a cloud-based analytics platform built on top of DuckDB that enables teams to analyze and share data without managing complex infrastructure.
DataFrame →A DataFrame is a two-dimensional data structure that organizes data into rows and columns, similar to a spreadsheet or database table.
SQL →SQL (Structured Query Language) is the standard language for working with relational databases.
data app →A data app is an interactive software application that allows users to explore, analyze, and visualize data without requiring extensive coding skills.
connectorx →connectorx is a Rust-based Python library for loading data from SQL databases into DataFrames (pandas, Arrow, Polars) as fast as possible by parallelizing extraction and avoiding unnecessary data copies.
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.
