SQL Node
Quick Reference
SQL Query Write a SQL statement to transform or filter records.
Overview
The Fleak SQL Node allows you to manipulate and transform data within your data workflows using PostgreSQL-compatible SQL syntax.
Built on FleakSQL, a custom-built engine designed specifically for data processing, this node enables you to handle data transformations without the need for an external database. It leverages your existing knowledge of SQL, aligning closely with PostgreSQL syntax to make data manipulation intuitive and powerful.
info
The input table is always called records — each record in the batch becomes a row, and your SQL query operates on the full batch.
Configuration
| Field | Description | Required | Placeholder |
|---|---|---|---|
| sql | A SQL statement to transform or filter records. The input table is records. | Yes | select * from records; |
Examples
-- Select all fields
select * from records;
-- Rename and compute fields
select user_id, amount * 100 as amount_cents, upper(status) as status from records;
-- Filter rows
select * from records where level = 'ERROR' and ts > 1700000000;
-- Extract nested JSON fields
select data->'user'->>'name' as username, data->'user'->>'email' as email from records;
-- Aggregation with GROUP BY
select status, count(*) as cnt, sum(response_time::numeric) as total_time from records group by status;
-- Conditional logic with CASE WHEN
select id,
case when severity > 7 then 'critical' when severity > 4 then 'warning' else 'info' end as level
from records;
-- Type casting
select amount::numeric * 100 as amount_cents, created_at::timestamp as ts from records;
Fleak SQL
For a complete list of supported functions, please consult the Fleak SQL Reference.