Formulas and transforms
정상 동작Formula cells that compute one value from earlier results, and no-code transform steps that run on downloaded rows in the notebook's local SQL.
Two cell kinds compute on results the notebook already has, without writing SQL against the database: a 수식 cell works out one value, and a 변환 cell reshapes a whole result step by step.
Formula cells
A Formula cell holds one expression and shows its value large, formatted as a number, currency or percentage. Name the cell, and the value can be used elsewhere: {{aov}} in a Markdown cell shows it in the text, and {{aov}} in a SQL cell writes it into the query as a literal of the right type for that database.
round(sum(orders.amount) / count(orders), 2)


The syntax reads like SQL:
- 참조
- A cell by name (
orders), one of its columns (orders.amount), a single value (orders.amount[0]for the first row,[-1]for the last), a parameter (param.region), another formula cell by name, and"quoted names"for names with spaces. - 연산자
+ - * / % ^,||to join text, comparisons, andand,or,notwith SQL's NULL rules.- 함수
if,coalesce,nullif;round,floor,ceil,abs,sqrt,ln,log10,exp,pow,sign; column totalssum,avg,min,max,count,count_distinct,median,first,last;safe_div(no divide-by-zero error) andpct_change; datesdate,date_diff,date_add,year,month,day; textlen,lower,upper,trim,concat.
Formulas recompute as soon as a cell they read has a new result. They can't read files or reach the network, and they stop with an error rather than run away: at most 4,096 characters, 64 levels of nesting and a fixed amount of work (rows read by totals count towards it). A syntax error says where: "The formula has a syntax error at character 14."
Exact numbers
Whole numbers and decimals keep every digit, up to 38 of them: a 19-digit order id or a decimal(38,2) total is never rounded through floating point. Adding, subtracting, multiplying, %, comparisons, sum, min, max, first, last, median, round, floor, ceil, abs 그리고 sign stay exact, and the value goes into SQL with all its digits. Division, avg, roots, logarithms and powers work in floating point; when that drops digits from a number that was exact, the cell says "Approximate: a number too long for floating point lost its last digits in this calculation."
Formulas over partial data
A formula that reads a cut-short, sampled or partial result computes over the rows it has and says so: "Computed from partial data: the value may not cover the whole result." (Picking a single row from the top, such as orders.amount[0], doesn't count, because those rows are there.) The mark travels with the value: a SQL cell that uses it, directly or through a cell it references, is marked "Computed from partial data" too, and so are the charts, KPIs and exports built on that cell, even though the query itself returned every row.
Renaming a cell rewrites the formulas that name it, the same as {{…}} references; see Renaming.
Transform cells
A Transform cell builds a new result from another one with a list of steps: Add step to add one, 제거 to drop one, 실행 취소 to take back the last change. The steps compile to one DuckDB query, shown under the steps ("Generated SQL (DuckDB, read-only)") with Open in Editor. 다음을 누르세요 Run transform to run it: it runs in the notebook's local data on the rows already downloaded, and nothing is sent to the database.
- 필터
- Keep rows where a column is
=,≠,<,≤,>또는≥a value, contains or starts with some text, is empty or not empty, or is one of a list. 포함함 그리고 starts with ignore case. ≠ follows SQL and leaves out rows where the column is empty, unless you tick Keep empty values. The value is passed as you typed it and DuckDB reads it as the column's type, so007still matches a text column. - Choose columns
- Keep and order the columns you want.
- 이름 바꾸기
- Give a column a new name.
- 계산된 열
- Add a column from an expression, such as
amount * (1 - discount). - Group
- Group by columns and add aggregates (sum, average, minimum, maximum, count, distinct count, median) with Add aggregate.
- 조인
- Join another cell's result on matching columns: inner, left, right or full.
- Sort, Limit
- Order the rows and keep the first N.
- Pivot, Unpivot
- Turn a column's values into columns, or columns back into rows. Steps after a pivot offer the pivoted columns, named from the input's values (up to 200).


Each input is copied into local data as nb_ plus the input cell's name, replaced on every run, and the transform's result (up to 100,000 rows) shows in a preview grid and can feed charts, tables, tests and other cells like any result. Column names and values are quoted for DuckDB, so a hostile column name can't change the query. Stop cancels a running transform.
Unlike charts, a transform doesn't recompute on its own when its input changes: it is marked out of date, and its dependents wait until you run it again. Inputs that were cut short are marked as such in the transform's provenance, and so is its result.
제한 사항
- Transforms and formulas don't run in the CLI yet; see What the CLI runs.
- Transforms need the notebook's local data, so they don't run in the browser build.