DATASET SQL QUERY

Runs an arbitrary SQL SELECT statement against an in-memory table built from the input dataset and returns the filtered/aggregated result as a new dataset. Use it to subset rows, compute aggregates, or join columns without writing custom code. The literal token TABLENAME in the query is automatically replaced with the internal temporary table name.

When to use

Classification: process.

Tagged: aggregate, dataset, filter, query, select, sql, transformation.

Inputs

Label ID Type Default Required Description
Dataset dataset dataset   Input dataset to query; its rows are loaded into a temporary SQL table referenced as TABLENAME in the query. Optional if the query is self-contained.
SQL Query query textarea SELECT * FROM TABLENAME   SQL SELECT statement to execute; must use the literal token TABLENAME as the table reference (e.g. SELECT MAX(col) FROM TABLENAME WHERE C2 < 20). Defaults to SELECT * FROM TABLENAME which returns the full dataset unchanged.
Optional Primary Keys primary_keys text   Optional comma-separated column name(s) to designate as primary keys on the output dataset; leave blank if no primary-key constraint is needed.

Outputs

Label ID Type Description
dataset_sql_query_output_1 dataset_sql_query_output_1 dataset Resulting dataset produced by the SQL query — contains only the rows and columns selected or computed by the statement.

Disciplines

  • data.dataset.transform
  • data.io.sql

Runnable example

A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=dataset_sql_query


Auto-generated from transformation schema. Worker id: dataset_sql_query. Schema hash: fd22da7c2ee4. Hand-curated docs in workerexamples/ override this page when present.