Extend
extend
Adds one or more computed columns to the input while keeping all existing columns.
Spec
... | extend <column_name> = <expression> [, ...] Parameters
column_name - The name of the new column to add.
expression - An expression evaluated for each row. Return Value
The input table with the additional computed columns appended. Example
datatable(Name:string, Price:float64)
[
"Widget", 9.99,
"Gadget", 24.99
]
| extend Tax = Price * 0.1
| extend Total = Price + Tax | Name | Price | Tax | Total |
|---|---|---|---|
| Widget | 9.99 | 0.999 | 10.989 |
| Gadget | 24.99 | 2.499 | 27.489 |