> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/modeling/query-views/parameters/join-via-map",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# join_via_map

> Maps joins when the query view is based on SQL and the joins are non-default joins.

## Syntax

```yaml theme={null}
query:
  join_via_map:
    <view_name>: []
    <view_name>: [<view_name_to_map_to>]
```

## Properties

<ParamField path="query" type="object[]">
  An object containing the individual parameters that make up a query view's query definition.

  <Expandable title="query properties" defaultOpen="true">
    <ParamField path="join_via_map" type="object">
      A mapping of view names to arrays indicating how joins should be made. Empty arrays indicate direct joins, while non-empty arrays specify intermediate views to join through.
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Join order_items to orders" highlight={6-8} theme={null}
query:
  fields:
    users.id: id
    order_items.sale_price_sum: sales
  base_view: order_items
  join_via_map:
    orders: []
    order_items: [ orders ]
```
