Control / params · All operations
Set a variable from data
A variant of Set parameters
Take a value computed from a table or query, such as a cell, a row or a count, and hold it as a variable.
Status
- In arcform
Not built yet
arcform does not do this yet; it would live in how a Protocol runs. Its place on the roadmap
What other tools call it
Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).
Apache Hop (1)
Set Variablesread 2026-09-27Set variables from the fields of a row, at a chosen scope
dbt-utils (2)
get_query_results_as_dictread 2026-09-27Run a SQL query at compile time and return its result columns as a dictionary
get_single_valueread 2026-09-27Run a SQL query at compile time and return its single value, with a default
Duckle (1)
Set Run Variableread 2026-09-25compute a value by SQL during the run and expose it as a run variable
KNIME Analytics Platform (2)
Table Column to Variableread 2026-09-27Turn a column's values into flow variables named by RowID
Table Row to Variableread 2026-09-27Turn the first row's values into flow variables named by column
Pentaho Data Integration (1)
Set Variablesread 2026-09-27Set environment variables from a single input row
RapidMiner Studio (5)
Extract Last Modifying Operatorread 2026-09-27Set a macro to the name of the operator that last modified an object
Extract Macroread 2026-09-27Set a macro from a table: a cell value, a statistic, row count or column count
Extract Macro (Format)read 2026-09-27Set a macro from a table value with date or number formatting, or from a collection's size
Extract Macro from Annotationread 2026-09-27Set macros from the values of an object's annotations
Set Macros from ExampleSetread 2026-09-27Set macros from the rows of a name-value table
SQLMesh (1)
@EVALread 2026-09-27Evaluate a SQL expression at render time with SQLGlot's executor and emit the result
Talend (1)
tContextLoadread 2026-09-27Set the values of the active context from an incoming flow, warning on undefined parameters
Background
In DuckDB, the SET VARIABLE statement can assign a variable the result of a query, such as a list of file names read from a table.[1] Apache Hop's Set Variables transform sets variables from the fields of a data row.[2] In KNIME, the Table Row to Variable node uses the first row of a table to define new flow variables, named by its columns and valued by that row's cells.[3]
When to use it
KNIME's Table Row to Variable node converts only the first row of its input table to flow variables, discarding the rows below it.[4] Sort and filter down to the one row you mean before turning it into variables; the first row of an unsorted table is not a choice you made. (Meridian's view) Apache Hop's Set Variables transform accepts one and only one row of data, and fails when it receives two or more.[2]
In Apache Hop, a variable set by the Set Variables transform cannot be used in the same pipeline, because all transforms in a pipeline run in parallel.[2] Apache Hop's Set Variables transform sets a default value when it receives no row, but an empty field sets an empty value, not the default.[2] Decide before the run what an empty result should mean: a sensible default, or a stop. (Meridian's view)
The method
In RapidMiner, a macro is a value that every operator coming after its definition in a process can use, written in the %{macro_name} format.[5] RapidMiner's Extract Macro operator sets the value of a macro from properties of an input data table, including statistics such as the average, minimum or maximum value of one of its attributes.[5]
Apache Hop's Set Variables transform sets each variable at a chosen scope: the whole Java virtual machine, the parent, the grand-parent or the root workflow or pipeline.[2] In DuckDB, a variable assigned from a query is read with getvariable, for example to pass a list of files to read_csv.[1]
Sources
- [1]SET VARIABLE and RESET VARIABLE Statements – DuckDBdocumentation
- [2]Set Variables | Apache Hopdocumentation
- [3]Table Row to Variabledocumentation
- [4]Flow Control Guide | KNIME Documentationdocumentation
- [5]Extract Macro - Rapidminer Documentationdocumentation