7.00.02 - SQL-MapReduce Call - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
Last Update
2018-04-17

This call finds the management chain of employee 500 by traversing the tree of employees from employee 500 upward.

SELECT * FROM ntree (
  ON employee_table PARTITION BY 1
  Root_Node (mgr_id IS NULL)
  Node_ID (emp_id)
  Parent_ID (mgr_id)
  Starts_With (emp_id=500) 
  Mode ('up') 
  Output ('end')
  Result (PATH(emp_name) AS path)
) ORDER BY 1;