nPath Function | Teradata Vantage - nPath® (SQL Engine) - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™

The nPath function scans a set of rows, looking for patterns that you specify. For each set of input rows that matches the pattern, nPath produces a single output row. The function provides a flexible pattern-matching capability that lets you specify complex patterns in the input data and define the values that are output for each matched input set.



nPath is useful when your goal is to identify the paths that lead to an outcome. For example, you can use nPath to analyze:

  • Web site click data, to identify paths that lead to sales over a specified amount
  • Sensor data from industrial processes, to identify paths to poor product quality
  • Healthcare records of individual patients, to identify paths that indicate that patients are at risk of developing conditions such as heart disease or diabetes
  • Financial data for individuals, to identify paths that provide information about credit or fraud risks

The output from the nPath function can be input to other ML Engine functions or to a visualization tool such as Teradata® AppCenter.

Sankey Diagram of Advanced SQL Engine nPath Output
Sankey diagram of output of Advanced SQL Engine function nPath
  • This function requires the UTF8 client character set for UNICODE data.
  • This function does not support Pass Through Characters (PTCs).

    For information about PTCs, see Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125.

  • This function does not support KanjiSJIS or Graphic data types.
  • When used with this function, the ORDER BY clause supports only ASCII collation.
  • When used with this function, the PARTITION BY clause assumes column names are in Normalization Form C (NFC).