Can I reference a column from the database table of another view?

Knowledge Drop

Last tested: May 2020

No, you can only reference LookML fields from other views. This is why we recommend making a base dimension for each field in the database.

Example

In the first view, make a dimension that references the database table.

view: orders {... dimension: id { type: string sql: ${TABLE}.id ;;}

In the second view, reference that dimension.

dimension: order_id { type: string sql: ${orders.id} ;;}

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 09:09 AM
Updated by: