Fleak SQL Node
Introduction
FleakSQL is our custom-built SQL engine designed from the ground up to manipulate data for event workflows, without the need for a database. We’ve chosen SQL because it’s the most effective domain-specific language (DSL) for handling data. This allows you to apply your existing SQL knowledge, eliminating the need to learn yet another custom DSL. Additionally, any techniques or optimizations you master in SQL can be used across all environments that support it.
We try to align FleakSQL as much as possible with PostgreSQL, but our goal is a similarity to syntax rather than 1:1 parity.
For more information about Fleak SQL syntax and examples, check the Fleak SQL Reference
What Can You Do with FleakSQL?
Nested maps and lists are automatically handled as JSON types, allowing you to use Postgres-style JSON syntax to access elements within lists or keys in maps.
For example, imagine you have a JSON map as:
{
"name": "ABC",
"age": 21
}
You can select the columns using:
SELECT
name,
age
FROM
events
Accessing Nested Data
Nested maps and lists are automatically treated as JSON types. This means you can use Postgres style json syntax to access list items or map keys.
For example:
{
"name": "abc",
"address": {
"country": "US"
}
}
To select the country, you can do the following:
SELECT
addres -> 'country'
FROM
events