age icon indicating copy to clipboard operation
age copied to clipboard

[Creating Table]Creating Table, Temporary Table, View from Graph in AGE

Open cho2hhun opened this issue 1 year ago • 4 comments

First of all, I'd used Agens Graph also, So this issue is disadvantage compare to Agens Graph

I think the one of the advantages of AGE and Agens Graph which is supported Hybrid DBMS and Query between RDB and GDB is that it can make 'Table form' from Graph in GDB

In the case of Agens Graph, It is possible to convert to Table, Temporary Table, View from Graph in AGE GDB But in AGE, only possible to convert to 'View' not Table, Temporary Table

creating Table & Temporary Table from Graph Cypher query in AGE GDB

ERROR:  unhandled cypher(cstring) function call

but can covert to View from Graph like below code

create view aaa as (
	select * from cypher ('bitcoin', $$
						  match (a : vt_rater)-[r1 : eg_rate]->(b : vt_rater)
						  with a.rater as a_rater, count(r1) as cnt order by count(*) desc limit 100
						  with collect(a_rater) as a_rater_list
						  match (c : vt_rater)-[r2 : eg_rate]->(d : vt_rater)
						  where c.rater in a_rater_list
						  return c, r2, d $$) as (c agtype, r2 agtype, d agtype)
);
  • To add, I think Saving as a Table form is really sensitive and efficient by handling Graph Data above Query is finding TOP 100 evaluting Rater's Network user from 'Bitcoin Evalution Graph' Indeed, for repeated use for that Network, the readablity is really really bad. So I think it is necessary to declare it to something, but Table form declaring and saving was really surprised for me I Think This would be really Hybrid query between RDB and GDB if there were revision that could declare and save Graph to Table and Temporary Table also So if u guys have any Idea, let's Share it!

Version INFO : 13

cho2hhun avatar Sep 11 '23 07:09 cho2hhun

@cho2hhun Can you give the complete commands that caused an issue with creating a Table or Temporary Table?

jrgemignani avatar Sep 12 '23 22:09 jrgemignani

Hello @jrgemignani !!

For example if i try to make table with SELECT query that is including cypher query, then table and temporary table is not created

below is query

create table tbtb as (
select * from cypher ('car', $$
					 match (a : vt_car)
					 return a $$) as (a agtype)
);

and error is like below

ERROR:  unhandled cypher(cstring) function call
DETAIL:  car
SQL state: XX000

but View is properly created with above method!!!

cho2hhun avatar Sep 19 '23 01:09 cho2hhun

This issue is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 11 '24 00:05 github-actions[bot]

@cho2hhun A PR #1799 by @jrgemignani was merged recently that may resolve this issue. It would be great if you could test and close this issue if it resolves your problem.

Related Issue: #1767

MuhammadTahaNaveed avatar May 11 '24 14:05 MuhammadTahaNaveed

This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 11 '24 00:07 github-actions[bot]

This issue was closed because it has been stalled for further 14 days with no activity.

github-actions[bot] avatar Jul 26 '24 00:07 github-actions[bot]