# Join parameters

<br />

This page links to all the LookML parameters that are children of the `join` parameter. You can learn more about using joins on the [Working with joins in LookML](https://docs.cloud.google.com/looker/docs/working-with-joins) documentation page.

A join is what allows multiple [views](https://docs.cloud.google.com/looker/docs/reference/param-view) to be added to a single [Explore](https://docs.cloud.google.com/looker/docs/reference/param-explore), allowing users to access and compare fields from various views at the same time. You declare the Explore and any desired `join` parameters in a [model file](https://docs.cloud.google.com/looker/docs/reference/param-model).

## Example usage

Hover over a parameter name to see a quick description; click it to jump to that page.
When a parameter can be set to one of several specific options, the default value is listed first.

```
## STRUCTURAL PARAMETERS
https://docs.cloud.google.com/looker/docs/reference/param-explore-explore: explore_name {
  # Desired Explore parameters (described on Explore Parameters page)

  https://docs.cloud.google.com/looker/docs/reference/param-explore-join: join_name  {

    # DISPLAY PARAMETERS
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-view-label: "desired label for the view"

    # JOIN PARAMETERS
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-fields: [field_or_set, field_or_set, ...]
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-foreign-key: dimension_name
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-from: view_name
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-outer-only: no | yes
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-relationship: many_to_one | many_to_many | one_to_many | one_to_one 
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-required-joins: [view_name, view_name, ...]
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-on: SQL ON clause ;;
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-table-name: table_name ;;
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-type: left_outer | cross | full_outer | inner 

    # QUERY PARAMETERS
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-required-access-grants: [access_grant_name, access_grant_name, ...]
    https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-where: SQL WHERE condition ;;
  }
  # Possibly more join declarations
}
```

## Parameter definitions

| Parameter Name | Description |
|---|---|
| Structural Parameters ||
| [`join`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join) | Joins an additional view to an Explore |
| Display Parameters ||
| [`view_label` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-view-label) | Changes the way the join's view name appears in the field picker |
| Join Parameters ||
| [`fields` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-fields) | Determines which fields from a join are brought into an Explore |
| [`foreign_key`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-foreign-key) | Specifies a relationship between an Explore and a join using the joined view's primary key |
| [`from` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-from) | Specifies the view on which a join will be based |
| [`outer_only`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-outer-only) | Specifies whether all queries must use an outer join |
| [`relationship`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-relationship) | Declares a join as having a one-to-one, many-to-one, one-to-many, or many-to-many relationship |
| [`required_joins`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-required-joins) | Specifies which joins should be applied to an Explore when fields from a certain join are chosen |
| [`sql_on`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-on) | Specifies a relationship between an Explore and a join by writing a SQL `ON` clause |
| [`sql_table_name` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-table-name) | Specifies the database table on which a join will be based |
| [`type` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-type) | Declares a join as being a left, a full, an inner, or a cross type |
| Query Parameters ||
| [`required_access_grants` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-required-access-grants) | Limits access to the join to only users whose user attribute values match the access grants |
| [`sql_where`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-where) | If this join is included in the query, inserts conditions into the query's `WHERE` clause that a user cannot change or remove for this Explore. (For BigQuery only) |
| Parameters to Avoid ||
| [`sql` (for join)](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql) | Avoid 3.10 Replaced by a combination of [`sql_on`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-on), [`foreign_key`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-foreign-key), [`type`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-type), and/or [`sql_table_name`](https://docs.cloud.google.com/looker/docs/reference/param-view-sql-table-name), as described [here](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql#definition) |
| [`sql_foreign_key`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-sql-foreign-key) | Avoid 3.16 Replaced by [`foreign_key`](https://docs.cloud.google.com/looker/docs/reference/param-explore-join-foreign-key) |

> > [!NOTE]
> > **Note:** The [`always_join`](https://docs.cloud.google.com/looker/docs/reference/param-explore-always-join) parameter specifies any joins that must always be applied to an Explore. That parameter is defined in an [Explore](https://docs.cloud.google.com/looker/docs/reference/param-explore-explore), so it is listed on the [`explore` parameter](https://docs.cloud.google.com/looker/docs/reference/param-explore) page.
>