I’ve got a couple of tables in my data that require being joined to other tables in order to calculate certain fields correctly. What I’ve done is add a derived_table
to a view file like this:
- view: table1_with_table2
derived_table
sql: |
SELECT ...
FROM table1 t1 JOIN table2 t2 ON t1.table1_pk = t2.table1_fk
WHERE ...
I then reference this view in an explore definition:
- explore: table1_explorer
view: table1_with_table2
always_join:
It looks like my issue is merely because I neglected to use the SQL_TABLE_NAME
syntax as documented here: https://docs.looker.com/data-modeling/learning-lookml/derived-tables#referencing_derived_tables_in_o...