Skip to main content

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

  1. Data arrives from a source and is written to a topic (SQLite table).
  2. The joiner checks which join queries reference that topic.
  3. Those join queries are re-evaluated against the current state of all referenced topics.
  4. 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:

Result Format

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.
  1. Index your join keys. Use the key column for joins when possible — it’s indexed by default.
  2. Keep queries focused. Each join should produce one type of output. Use multiple joins for different result shapes.
  3. Use json_extract() for access. All application data lives in the payload JSON column.
  4. Test with Studio. Use LiteJoin Studio to iterate on queries with live data before deploying.

Example: Payment Enrichment