The NTree function is a hierarchical analysis SQL function that can build and traverse tree structures on all worker machines. The function reads the data only once from the disk and creates the trees in memory.
The input data must be partitionable, and each partition must fit in memory. Each partition can consist of multiple trees of any size. The function provides different ways of handling cycles.