Control / inflight sql · All operations
Run a step inside a database
Push a step down into a database rather than the tool's own engine.
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
- Shape of the result
- not a data operation
- Level
- not a step
Variants
Control what is pushed down
Stop later steps from being pushed down to the source, or intercept them so the source can answer them.
Move data or queries between the database and the tool
Bring rows into the database to join an in-database chain, pull its result back, or pass its query text in or out as values.
Run a query in the database's own language
Send hand-written SQL to the source database to run there as written, and take its result.
Push pipeline steps down into the database
Have the tool translate a chain of ordinary steps into SQL, or another engine's jobs, that run where the data lives.
What other tools call it
Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).
Alteryx Designer (4)
Data Stream Inread 2026-09-27Move data from the Designer engine into a table in the database to join an in-DB stream
Data Stream Outread 2026-09-27Pull the result of an in-DB stream out of the database into the Designer engine
Dynamic Input In-DBread 2026-09-27Take connection name and query fields from a standard stream and re-enter an in-DB stream
Dynamic Output In-DBread 2026-09-27Output the in-DB stream's connection, query and metadata as fields in a standard stream
Bruin (2)
Default: no materializationread 2026-09-27Run the query as written each time; the user stores results with their own statements
fabric.spark_sqlread 2026-09-27Run Spark SQL on a Fabric Lakehouse through the Livy API
Duckle (1)
Execute in Sourceread 2026-09-25run CREATE TABLE AS on the source server through postgres_execute or mysql_execute
KNIME Analytics Platform (5)
DB Queryread 2026-09-27Wrap the incoming DB query in user-written SQL that runs in the database
DB Query Extractorread 2026-09-27Output the SQL text of the incoming DB query as a table and flow variable
DB Query Injectorread 2026-09-27Build a DB data port from a connection and a SQL string held in a flow variable
KNIME Extension for Apache Spark (extension)read 2026-09-27Extension outside the base install: 92 current nodes: Avro to Spark; CSV to Spark; Create Spark Context (Livy); DB to Spark, …
Extension outside the base install: 1 current node: Run R Model in Microsoft SQL Server
Power Query M (4)
Table.StopFoldingread 2026-09-27Stop later steps from being pushed down to the data source
Table.Viewread 2026-09-27Wrap a table with user-defined handlers that intercept operations so they can be answered by the source
Table.ViewFunctionread 2026-09-27Make a function that a Table.View handler can intercept and answer at the source
Value.NativeQueryread 2026-09-27Run a query written in the source's own language, such as SQL, against a data source
RapidMiner Studio (1)
In Database Nestread 2026-09-27Translate a nested chain of in-database operators to SQL and run it in the database
Talend (3)
ELT input, map and output components (family)read 2026-09-2737 components building one SQL statement run in the database: tELTInput, tELTMap, tELTOutput, tELTOracleUniteMap
tCombinedSQLInputread 2026-09-27Name the source table and fields for a chain of combined SQL components run in the DBMS
tCombinedSQLOutputread 2026-09-27Insert the result of a chain of combined SQL components into an existing table, in the DBMS
Background
In-database processing does the analysis in the database where the data resides, instead of moving the data out to a separate analytics environment.[1] In Microsoft Power Query, query folding translates supported transformations into operations that a data source can perform.[2] In DuckDB, the postgres_query function runs a read query written in Structured Query Language (SQL) inside an attached PostgreSQL database.[3]
When to use it
Doing the analysis in the database, where the data resides, eliminates the costs, time and security issues of moving the data out for processing and back.[1] In Power Query, query folding often gives faster query execution than extracting all the required data from the source and running every transform in the Power Query engine.[2] In Power Query, sources without a query engine, such as comma-separated values (CSV) and Excel files, don't support query folding.[2] Reach for a database step when the table is large and already sits in a database that can do the work, so that only the result has to travel. (Meridian's view)
In Power Query, transformations that can't be folded run in the Power Query engine.[2] Power Query's Table.StopFolding function prevents any downstream operations from being run against the original source of the data.[4] During optimisation, the Power Query engine might reorder query steps.[2] Where the connector allows it, Power Query's View Native Query or View data source query shows the request that Power Query sends to the data source.[2] Confirm which steps actually ran in the database rather than assuming the tool sent them there. (Meridian's view)
In RapidMiner's In Database Nest operator, setting the parallelize parameter submits several queries to the database at once, which may increase the load on the source database significantly.[5] In Alteryx Designer, the Data Stream In tool's Create Temporary Table mode requires CREATE TABLE permissions for all data sources except SQL Server.[6] In Alteryx Designer, a Pre-SQL statement runs before the in-database execution, and across several streams of In-Database tools no order of execution is guaranteed.[6] When one step's setup must happen before another's in the database, keep them in a single chain rather than relying on the order the tool happens to choose. (Meridian's view)
The method
In-database processing comes in three main types: translating a model into SQL code, loading C or C++ libraries into the database process as a user-defined function (UDF), and registering out-of-process libraries as UDFs.[1] When a predictive model is translated into SQL, the SQL usually runs in the database in a stored procedure, with values passed in through parameters.[1] An in-process UDF has full access to the database server's memory, parallelism and processing management, so it must be well-behaved so as not to harm the database or the engine.[1] Out-of-process UDFs run in their own process space with their own resources, so they carry less risk to the database but are not expected to perform as well as in-process ones.[1]
Power Query's query folding sends metadata requests to learn the data source's capabilities, table schemas and relationships, then determines what to extract from the data source and which transformations must occur inside the Power Query engine.[2] Power Query's data source functions, commonly shown as the Source step of a query, query the data source in its native language, and later transformations fold only when the connector and transformations support it.[2] Power Query's query folding can translate and combine supported transformations into a single data source query.[2] Power Query distinguishes full query folding, where the data source processes all transformations, partial query folding, and no query folding, where the Power Query engine processes them all.[2] RapidMiner's In Database Nest operator translates the steps its subprocess defines to SQL and submits that code into the selected database.[5] In RapidMiner's In Database Nest, only operators from the In-Database Processing group can be used inside it unless its allow all operators parameter is set, and the generated query is kept as an annotation on each data set it returns.[5]
KNIME's DB Query node lets the user write SQL around the incoming query, which appears in it as the placeholder #table# and is replaced at execution, creating a sub-query.[7] Power Query's Value.NativeQuery function evaluates a query against a target, with the query expressed in a manner specific to the target and optional parameter values supplied for it.[8] DuckDB's postgres_execute function runs arbitrary queries within PostgreSQL, including statements that update the schema and content of the database.[3] Alteryx Designer's Data Stream In tool brings data from Designer into an In-Database workflow, and its Data Stream Out tool streams data from an In-Database workflow back out to Designer.[6][9] Alteryx Designer's Data Stream In tool can write the incoming data to a temporary table, created with a CREATE TABLE statement and removed by the Alteryx engine when the workflow completes.[6]
In-database capabilities were first offered commercially in the mid-1990s by vendors including IBM, Illustra/Informix and Oracle, but the technology did not begin to catch on until the mid-2000s.[1] Thomas Tileston first introduced the idea of migrating analytics from the analytical workstation into the enterprise data warehouse at the Teradata Partners conference in Orlando in September 2005.[1]
Compared with the alternatives
In DuckDB, the tables of an attached PostgreSQL database can be read as if they were DuckDB tables, with the underlying data read directly from PostgreSQL at query time.[3] As of DuckDB 2.0, the CONNECT statement routes a whole session to an attached PostgreSQL database, and queries are then shipped to the PostgreSQL server instead of pulling tables over the wire.[3] Reading an attached table and letting filters travel is the light touch; a hand-written query sent with postgres_query or postgres_execute suits work the analyst wants written in PostgreSQL's own SQL. (Meridian's view)
Power Query's Table.Buffer function buffers a table in memory, isolating it from external changes during evaluation, while Table.StopFolding prevents any downstream operations from being run against the original source of the data.[10] Choose between buffering a table and stopping folding by the effect wanted: holding the data still, or keeping later steps away from the source. (Meridian's view)
Sources
- [1]In-database processingsecondary source
- [2]Understanding Query Evaluation and Query Folding in Power Querydocumentation
- [3]PostgreSQL Extensiondocumentation
- [4]Table.StopFoldingdocumentation
- [5]In Database Nestdocumentation
- [6]Data Stream In Tooldocumentation
- [7]DB Querydocumentation
- [8]Value.NativeQuerydocumentation
- [9]Data Stream Out Tooldocumentation
- [10]Table functionsdocumentation