Tip #1 - introduction and 'show the whole graph'

So, I will be adding a bunch of functions and other useful tips that I have found in my time using TigerGraph. Questions welcome.

So #1: How do you show the entire graph.

Here is a small function. Extra points for spotting the way I avoid using up memory. You only need to adjust the name of the graph on the definition line. Everything else will just work.

CREATE QUERY tips_show_graph() FOR GRAPH Claims { 
// WHOLE GRAPH:
//  Show it all, including attributes!
  ListAccum <EDGE> @@allE;
  G = {ANY};
	
  G2 = SELECT s FROM G:s-(:e)->:t 
	ACCUM @@allE += e
	HAVING 1==0;
	
  PRINT G, @@allE;
	
}
1 Like