Custom SQL transforms

Transform files or lists into CSV output by running a custom SQL query.

Custom SQL transforms run a SQL query against your input, treating each file or list as a table. The query's result becomes the output CSV list. This is useful for joins, aggregations, and filtering that are more natural to express in SQL than in code.

Availability: GA

What it does

  • Input: files or lists.
  • Output: one or more CSV lists, produced by the result of your SQL query.
  • Each input file or list is available as a table you can reference by name in your query. Standard SQL operations — SELECT, JOIN, GROUP BY, WHERE — are supported.

When to use it

  • You need to join two or more files or lists on a shared key.
  • You need aggregations, deduplication, or filtering that's easiest to express as a query.
  • You're more comfortable writing SQL than JavaScript or Python.

How to configure it

Add a Custom SQL transforms node after the nodes that produce the files or lists you want to query, then write your query in the settings panel.

Settings

SettingDescriptionDefault
SQL queryThe SQL query that produces the output list. Starts from a default code snippet you edit to fit your tables and columns.Default code snippet

Example

Input

Two CSV lists: orders and customers.

SQL

SELECT orders.order_id, customers.name, orders.total
FROM orders
JOIN customers ON orders.customer_id = customers.id

Output

A single CSV list combining order and customer details.

Troubleshooting

Query returns an error

  • Confirm table and column names match your input files or lists exactly.
  • Check for SQL dialect-specific syntax differences.

Unexpected number of rows

  • Review your join type — an inner join drops rows with no match, while a left join keeps them.
  • Check for duplicate keys in either table that could cause row multiplication.

See also


Did this page help you?