Skip to main content
FiQueLa can join data from different files — even across different formats — in a single query. Any file that FiQueLa can open can be used as a join source.
Joins load all data from the joined sources into memory. For very large files, this can significantly increase memory usage. Plan accordingly when joining large datasets.

Join types

Fluent API

Pass a query object as the join source along with an alias, then call on() to specify the join condition. You can provide the alias in two ways:
  1. As a second parameter: ->leftJoin($query, 'alias')
  2. Via fluent as(): ->leftJoin($query)->as('alias')
Both approaches are equivalent and backward-compatible.

Multiple joins

You can chain multiple join calls:

FQL syntax

The alias is required for joined sources, and fields from joined sources are referenced with alias.field notation.

Subquery JOINs

You can use a full SELECT statement as a join source by wrapping it in parentheses. The subquery is parsed recursively and must be aliased:
Subquery JOINs let you pre-filter or aggregate the join source before matching rows. The subquery runs its own full pipeline independently.

Joining across file formats

The join sources can use any format that FiQueLa supports. The left and right sources do not need to use the same format:

ON condition

The on() method (fluent) and the ON clause (FQL) accept the same condition syntax as where(). The left-hand field refers to the left source; the right-hand value refers to the joined source. When both sources are aliased, you can use aliased dot-notation paths in ON conditions for clarity:
Calling on() multiple times overwrites the previous condition. Define all join criteria in a single on() call, or use condition chaining through and()/or() after the on() call.