> ## 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.

# join_to_view_as - Relationships

> Aliases the joined view with a new name.

Aliases the joined view with a new name. This parameter is often used for multiple joins, such as when both `buyers` and `sellers` are populated via the `users` table.

## Syntax

```yaml theme={null}
join_to_view_as: <alias>
```

## Properties

<ParamField path="join_to_view_as" type="string">
  The alias name for the joined view. Both the original view name ([`join_to_view`](/modeling/relationships/parameters/join-to-view)) and this alias can be used in the [`on_sql`](/modeling/relationships/parameters/on-sql) parameter.
</ParamField>

<Warning>
  This alias only exists within this relationship's `on_sql` and the topic's [`joins`](/modeling/topics/parameters/joins) parameter. It can't be referenced in a view file's own field or dimension SQL, declared in a topic's [`views`](/modeling/topics/parameters/views) parameter without an `extends` parameter, or used as a join target in a different relationship — doing so produces a `Relationship alias duplicates view name` or `Table not found` error. See [Alias scope](/modeling/views/alias#alias-scope) for the workaround.
</Warning>

## Examples

```yaml highlight={3} theme={null}
- join_from_view: buyers
  join_to_view: user_facts
  join_to_view_as: buyer_facts
  join_type: always_left
  on_sql: ${buyers.id} = ${buyer_facts.id}
  relationship_type: one_to_one
```
