SQL cells
Add a SQL cell with Insert SQL below in a cell’s ⋯ menu, or select a cell and press S to turn it into SQL. The cell header has two settings:- Connection: where the query runs. Pick one of the workspace’s connections, or DuckDB to query the notebook’s own dataframes. DuckDB is the default.
- Result name: the variable the result is stored in. Other cells read the result by this name. The default,
_df, starts with an underscore, so it stays local to the cell. Rename it to use the result elsewhere.
Results
Results show as a table you can page through, filter, and sort. Copy as CSV copies the result. Results are dataframes. By default Alkera uses Polars when it is installed. Change it in notebook Settings under Frames as: Polars, pandas, or whichever is installed. Rows per SQL result caps how many rows a query returns. Leave it empty to keep every row.Use results in Python
A SQL cell’s result is a normal Python variable.alkera.sql:
Join across warehouses
A warehouse query cannot see another warehouse or the notebook’s dataframes. To combine data from two sources, query each one in its own cell, then join the results in a DuckDB SQL cell or in Python.Python cells
Python cells run any Python in the workspace’s environment. Each cell’s last expression is displayed as its output. Variables a cell defines are available to every cell that reads them.Markdown cells
Markdown cells hold headings, text, lists, and links. They render in place, and their headings appear in the Outline panel. To write Markdown from Python, usealkera.md.
Related
Reactivity
How SQL and Python cells stay current.
Plugins & Connections
The warehouses a SQL cell can query.