LookML developers can use derived tables to create new tables that are not already defined in the underlying database.
A new table could be a Native derived table or a SQL-based derived table.
Creating a SQL-based derived table involves writing a SQL query that summarizes the details for each table.
Native Derived Tables (NDT) are defined with a LookML-based query.
Temporary derived tables are generated at run-time, whereas persistent derived tables are ready to go when business users need them.
Persistent derived tables (PDTs) can be Looker-managed or database-managed.
Materialized views allow users to persist derived tables in the Looker project and are optimal for scenarios that require real-time data.
Deriving tables allows developers to explore advanced analytical possibilities in Looker and allows business users to access the custom business specific insights in shortest time possible.
Once the derived table has been persisted, the previous CTE identified by the WITH clause is no longer present and has been replaced by a SELECT statement querying fields from the order_details_summary persistent derived table.
Derived tables might seem daunting to learn, but are very much worth it.