How are NDTs built in relation to referenced derived tables?

Knowledge Drop

Last tested: Jan 21, 2019
 

When you create an NDT (native derived table) that is

  1. based on an explore which is filtered by a field in a joined table from that explore

AND/OR

  1. filtered by a field in a different view than the NDT

the NDT will build as a nested with clause subquery, such as:

 

WITH NDT as (WITH filtered_table AS (select statement))

(SELECT from filtered_table)

SELECT from NDT

This is because the NDT relies on the explore (and all its joins and filters) from which it is sourced, and those tables must be built alongside the NDT for it to resolve.

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 03:32 PM
Updated by: