All Forums Aster
ahadmushir 5 posts Joined 06/15
21 Jun 2015
How to make proper visualization for a Sankey?

I am using the following No-Sql query to create a path to be displayed via a Sankey. 

 create table public.less_test_ich_banking_final 
 distribute by hash (path) as 
 (
 SELECT  path, count(*) as count
 		FROM nPath (
	 		ON less_ses_ich_banking
	 		PARTITION BY customer_identifier, sessionid
	 		ORDER BY interaction_timestamp
	 		MODE (nonoverlapping)
	 		PATTERN ('INTERACTION*.CONVERSION')
	 		SYMBOLS (
	 			interaction_type <> 'COMPLETE_APPLICATION' AS INTERACTION,
	 			interaction_type = 'COMPLETE_APPLICATION' AS CONVERSION	
	 		)
	 		RESULT (
	 			accumulate (interaction_type OF ANY (INTERACTION, CONVERSION)) AS path
	 		)
	 	)
	 	
	 	GROUP BY 1
	 	ORDER BY 2 DESC
	 	);
	 	
	 	

The data used in this is of ICH_BANKING_DIST which I have sessionized. 

Jens.Humrich 14 posts Joined 03/15
22 Jun 2015

Where exactly lies the problem? Did you manage to follow the steps described in the user guide under "Creating a Visualization Table"? It shows the sql syntax for a sankey graph:
create table aster_lens.cart_abandonment distribute by hash(id) as
(select * FROM nPathViz(
ON aster_lens.npath_output_abandoned_shopping_order as input
partition by storeid
frequency_col('cnt')
graph_type('sankey')
path_col('path')
arguments('start_date=10/12/2013','end_date=10/30/2013',
'owner=ASTER','tags=Coupon Sale')
title('Shopping Order')
subtitle('Tracking order in which items added to cart')
accumulate('storeid'))
);
 

ahadmushir 5 posts Joined 06/15
02 Jul 2015

The problem doesn't lies in the SQL but in the visualisation. 
Are there any ways to improve the resulting sankey visualisation ?

You must sign in to leave a comment.