Join
Understanding Tables in RestBI
A Join
defines the relationship between two tables in the data model, allowing you to query and combine data across multiple tables. Joins are essential for constructing complex queries that require data from more than one table.
Overview & Usage
The Join
object specifies how two tables are related in the database, by defining one or more join conditions. These conditions determine how rows from one table match rows from another, enabling the combination of data across tables
Joins are used to link tables together within a model. Each join specifies the relationship between two tables using one or more join conditions. The join conditions determine how data is matched between the tables, enabling complex queries that pull data from multiple sources.
Example
Here is an example of how to define a Join
object:
Join Reference
id
A unique identifier for the join.
table1
The name of the first table in the join relationship.
table2
The name of the second table in the join relationship.
clauses
An array of JoinClause
objects, each representing a condition for how the tables should be joined.
joinType
The type of join to perform (INNER JOIN
, LEFT JOIN
, etc.). This is optional; the default is usually INNER JOIN
.
JoinClause Reference
column1
The name of the column from the first table in the join.
column2
The name of the column from the second table in the join.
operator
The operator used in the join condition (e.g., =
, <>
, etc.).
See Also
Last updated