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

# Aliasing views

> Alias views to handle database table renames or to create duplicate views for joins.

Aliasing lets you reference a view by an additional name. This is useful for handling database table renames and for creating duplicate views needed in join logic.

<Tip>
  Aliased views are best paired with [topics](/modeling/topics) and may not appear as views in **All Views and Fields** in the workbook. Additionally, aliased views can't be extended.
</Tip>

## Handling table name changes

If the name of view's base table changes in the database, it can cause content in Omni to break. Use the [`aliases`](/modeling/views/parameters/aliases) parameter to add the table's original name(s), which will allow Omni to find the correct table in the database.

## Duplicating views with aliases

In some cases, you may need to duplicate a view - for example, a `users` view that contains both **buyers** and **sellers**. Aliased views are automatically created when you define them as joins in the model's [Relationships file](/modeling/relationships).

The following example demonstrates how to alias the `users` view to create `buyers` and `sellers` views. Note that the names of the aliased views are used to declare the joins:

```yaml title="relationships.yaml" highlight={2,5,9,12} theme={null}
- join_to_view: users
  join_to_view_as: buyers
  join_type: always_left
  relationship_type: many_to_one
  on_sql: ${order_items.user_id} = ${buyers.id}
  reversible: false

- join_to_view: users
  join_to_view_as: sellers
  join_type: always_left
  relationship_type: many_to_one
  on_sql: ${order_items.user_id} = ${sellers.id}
  reversible: false
```
