Joins
Joins are the core of LiteJoin. They combine data from multiple topics using standard SQL and emit results to sinks every time new data arrives.
How Joins Work
- Data arrives from a source and is written to a topic (SQLite table).
- The joiner checks which join queries reference that topic.
- Those join queries are re-evaluated against the current state of all referenced topics.
- Results are grouped by a result key and emitted to the configured sink.
Joins are reactive — they fire on every write, not on a schedule.
Configuration
Fields
Join Types
LiteJoin supports all standard SQL join types:
INNER JOIN
Returns only rows where both sides match:
LEFT JOIN
Returns all rows from the left table, with NULL for unmatched right-side rows:
Multi-way Joins
Join three or more topics:
Join results are emitted as JoinResult objects:
Best Practices
Always include a time-bounded WHERE clause. Without it, join queries scan the entire topic, degrading performance as data grows. Use timestamp > (strftime('%s', 'now') - N) to limit to recent data.
- Index your join keys. Use the
key column for joins when possible — it’s indexed by default.
- Keep queries focused. Each join should produce one type of output. Use multiple joins for different result shapes.
- Use
json_extract() for access. All application data lives in the payload JSON column.
- Test with Studio. Use LiteJoin Studio to iterate on queries with live data before deploying.
Example: Payment Enrichment