Knowledge Drop

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

  • 5 April 2021
  • 0 replies
  • 619 views

Userlevel 5
Badge
  • Looker Staff
  • 173 replies

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.                


0 replies

Be the first to reply!

Reply