Is there any script for sankey chart on Teradata Appcenter?

Teradata AppCenter
AppCenter is a framework to build, share, deploy and consume big data apps for self-service analytics and discovery for the business community.
Teradata Employee

Is there any script for sankey chart on Teradata Appcenter?

Hello,

My name is MJ Ahn in TD korea.

I have installed the TD appcenter 1.3 and Tedata 16.20 on VM Ware and created the developer user through LDAP.

I made the SQL including the npath function and verified the SQL on TD 16.20.

Now, I would like to test the sankey chart for the npath on Teradata Appcenter 1.3.

Could I get the sample script for the sankey chart for the npath ?

 

 


Accepted Solutions
Teradata Employee

Re: Is there any script for sankey chart on Teradata Appcenter?

hi MJ Ahn,

Below is a script sample, could you please try this.

 

nPath.sql

---------------------------------------------------------------

--name=query1
SELECT customer_id as storeid, session_id as id, path, COUNT(*) as cnt
FROM nPath (
  ON bank_web_clicks
  PARTITION BY customer_id, session_id
  ORDER BY datestamp USING
  MODE (NONOVERLAPPING)
  PATTERN ('PAGE+.CONVERSION')
  SYMBOLS (
     page <> 'ONLINE STATEMENT ENROLLMENT'                 AS PAGE,
     page = 'ONLINE STATEMENT ENROLLMENT'                  AS CONVERSION
  )
  RESULT (
     FIRST (customer_id OF PAGE)                       AS customer_id,
     FIRST (session_id OF PAGE)                        AS session_id,
     ACCUMULATE (page OF ANY (PAGE, CONVERSION))       AS path
  )
) n
GROUP BY n.customer_id, n.session_id, n.path
ORDER BY n.customer_id, n.session_id ;

---------------------------------------------------------------

 

 

Screen Shot 2018-06-20 at 5.13.26 PM.pngSankey

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Screen Shot 2018-06-20 at 5.13.34 PM.png

 

 

 

Thank you!

1 ACCEPTED SOLUTION
2 REPLIES 2
Teradata Employee

Re: Is there any script for sankey chart on Teradata Appcenter?

hi MJ Ahn,

Below is a script sample, could you please try this.

 

nPath.sql

---------------------------------------------------------------

--name=query1
SELECT customer_id as storeid, session_id as id, path, COUNT(*) as cnt
FROM nPath (
  ON bank_web_clicks
  PARTITION BY customer_id, session_id
  ORDER BY datestamp USING
  MODE (NONOVERLAPPING)
  PATTERN ('PAGE+.CONVERSION')
  SYMBOLS (
     page <> 'ONLINE STATEMENT ENROLLMENT'                 AS PAGE,
     page = 'ONLINE STATEMENT ENROLLMENT'                  AS CONVERSION
  )
  RESULT (
     FIRST (customer_id OF PAGE)                       AS customer_id,
     FIRST (session_id OF PAGE)                        AS session_id,
     ACCUMULATE (page OF ANY (PAGE, CONVERSION))       AS path
  )
) n
GROUP BY n.customer_id, n.session_id, n.path
ORDER BY n.customer_id, n.session_id ;

---------------------------------------------------------------

 

 

Screen Shot 2018-06-20 at 5.13.26 PM.pngSankey

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Screen Shot 2018-06-20 at 5.13.34 PM.png

 

 

 

Thank you!

Teradata Employee

Re: Is there any script for sankey chart on Teradata Appcenter?

Hello Guanghui,

 

Thank you for your answer.