ngbatis icon indicating copy to clipboard operation
ngbatis copied to clipboard

NebulaDaoBasic‘s Schema support-show metas

Open wey-gu opened this issue 2 years ago • 2 comments

Hi @amritagg I'm glad you're interested in these features.

We need to add methods to NebulaDaoBasic that allow developers to quickly access data without having to write ngql Just like its other interfaces.https://github.com/nebula-contrib/ngbatis/blob/master/src/main/java/org/nebula/contrib/ngbatis/proxy/NebulaDaoBasic.java

The idea is to extract the more commonly used scripts, as the name of the task item means.

For example, show metas, developers can quickly get schema information by calling the interface, tag, edgeType, etc.

cc: @wey-gu

Originally posted by @CorvusYe in https://github.com/nebula-contrib/ngbatis/issues/234#issuecomment-1740238713

wey-gu avatar Sep 29 '23 06:09 wey-gu

I think underneath it's calling

SHOW TAGS
SHOW EDGES

And then to call

SHOW TAG <FOO_TAG>;
SHOW TAG <BAR_TAG>;
SHOW EDGE <A_EDGE_TYPE>;
SHOW EDGE <B_EDGE_TYPE>;

And put schema info into one object?

If that's the case, I implemented similar functions here as a reference:

https://github.com/jerryjliu/llama_index/blob/f8c07e8eeb52cc774d9a6334effcbe4c132daef5/llama_index/graph_stores/nebulagraph.py#L596

@CorvusYe

wey-gu avatar Sep 29 '23 06:09 wey-gu

That sounds useful! I will have a try to achieve the show the meta-structure of the graph maybe the output of it will be a map structure like space:test tag :[tagA,tagB,...] edge: [ edgeA,edgeB,...] tagIndex:[tagIndexA,tagIndexB,...] edgeIndex:[edgeIndexA,edgeIndexB] ... reference to this function https://github.com/run-llama/llama_index/blob/f8c07e8eeb52cc774d9a6334effcbe4c132daef5/llama_index/graph_stores/nebulagraph.py#L596-L660

I think underneath it's calling

SHOW TAGS
SHOW EDGES

And then to call

SHOW TAG <FOO_TAG>;
SHOW TAG <BAR_TAG>;
SHOW EDGE <A_EDGE_TYPE>;
SHOW EDGE <B_EDGE_TYPE>;

And put schema info into one object?

If that's the case, I implemented similar functions here as a reference:

https://github.com/jerryjliu/llama_index/blob/f8c07e8eeb52cc774d9a6334effcbe4c132daef5/llama_index/graph_stores/nebulagraph.py#L596

@CorvusYe

shbone avatar Oct 14 '23 07:10 shbone