unable to add edge gremlinpython janusgraph


Real Life Adventure <srinu....@...>
 

i am trying to add edge b/w vertices.not received any error when it executes.but edge is not added to graph.

followed below steps
v1=g.V().has('id',1).next()
v2=g.V().has('id',13).next()
g.V(v1).addE("Serivces").to(v2).next()

Thanks,
RLA.





Raghavendar T S <raghav...@...>
 

Hi 

Can you provide the schema as well? What is the query which you used to verify the read edge operation?

Thank you


Real Life Adventure <srinu....@...>
 

for querying edge count below query used.
g.E().count() is showing 0 in python as well in gremlin console.

Thanks,
RLA.

On Thu, 21 May 2020 at 17:52, Raghavendar T S <raghav...@...> wrote:
Hi 

Can you provide the schema as well? What is the query which you used to verify the read edge operation?

Thank you

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CABmtsnmNydq_Yn6n9c%3DJxTdmtbTYptma%3D7b75%2B47wX-GQobr%3Dg%40mail.gmail.com.


Raghavendar T S <raghav...@...>
 

Hi

Can you share the schema?

Thank you


On Thu, May 21, 2020 at 6:34 PM Real Life Adventure <srinu....@...> wrote:
for querying edge count below query used.
g.E().count() is showing 0 in python as well in gremlin console.

Thanks,
RLA.

On Thu, 21 May 2020 at 17:52, Raghavendar T S <raghav...@...> wrote:
Hi 

Can you provide the schema as well? What is the query which you used to verify the read edge operation?

Thank you

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CABmtsnmNydq_Yn6n9c%3DJxTdmtbTYptma%3D7b75%2B47wX-GQobr%3Dg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5Ly-YV4c5Y0yjY6UNz3c%2Bk%2Bb2r4z%3DGXxrK3nEPOCzjYBg%40mail.gmail.com.


--
Raghavendar T S


Real Life Adventure <srinu....@...>
 

 below schema i have used.
server= mgmt.makeVertexLabel('server').make()
Apps= mgmt.makeVertexLabel('Apps').make()
TagId= mgmt.makePropertyKey('TagId').dataType(String.class).make()
Partof= mgmt.makeEdgeLabel('Partof').make()

Thanks,
RLA. 


Raghavendar T S <raghav...@...>
 

I am not sure about the issue. But can you try adding label filter in the query for read operations.
E.g. g.V().hasLabel('LABEL').has('id',1).next()

Can you share the response for each of the queries separately with and without adding the label filter?

Thank you

On Thu, May 21, 2020 at 6:47 PM Real Life Adventure <srinu....@...> wrote:
 below schema i have used.
server= mgmt.makeVertexLabel('server').make()
Apps= mgmt.makeVertexLabel('Apps').make()
TagId= mgmt.makePropertyKey('TagId').dataType(String.class).make()
Partof= mgmt.makeEdgeLabel('Partof').make()

Thanks,
RLA. 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BXX1%3DsvOYNq7iqd9qBB5cTe5XEo5ptzPBDNGyYrip%3DoA%40mail.gmail.com.


--
Raghavendar T S


Real Life Adventure <srinu....@...>
 

i am able to add edge from gremlin console.
please see below commands successfully added edge from gremlin console.
v1=g.V().has('id',2).next()
v2=g.V().has('id',14).next()
g.V(v1).addE("Serivces").to(v2).next()

but from python iam unable to add edge.

Thanks,
RLA.


On Thu, 21 May 2020 at 18:59, Raghavendar T S <raghav...@...> wrote:
I am not sure about the issue. But can you try adding label filter in the query for read operations.
E.g. g.V().hasLabel('LABEL').has('id',1).next()

Can you share the response for each of the queries separately with and without adding the label filter?

Thank you

On Thu, May 21, 2020 at 6:47 PM Real Life Adventure <srinu....@...> wrote:
 below schema i have used.
server= mgmt.makeVertexLabel('server').make()
Apps= mgmt.makeVertexLabel('Apps').make()
TagId= mgmt.makePropertyKey('TagId').dataType(String.class).make()
Partof= mgmt.makeEdgeLabel('Partof').make()

Thanks,
RLA. 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BXX1%3DsvOYNq7iqd9qBB5cTe5XEo5ptzPBDNGyYrip%3DoA%40mail.gmail.com.


--
Raghavendar T S

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CABmtsnn-HjU10dTF3wjEXw3yUhScT%3DFT%2B7%3DbREJSqy0kREj5kQ%40mail.gmail.com.


Kevin Schmidt <ktsc...@...>
 

Where/how are you doing the g.E().count()?  Is it in the same session/transaction as the add or different?

It is possible that you are doing the add in python and the check in gremlin console, but are not doing a commit in python and thus the add isn't visible to the transaction in gremlin console.  When you do the add and check in gremlin console, that is all in the same transaction and so it will be seen.

Try adding a g.tx().commit() to your python code and see what happens.

Kevin

On Thu, May 21, 2020 at 7:01 AM Real Life Adventure <srinu....@...> wrote:
i am able to add edge from gremlin console.
please see below commands successfully added edge from gremlin console.
v1=g.V().has('id',2).next()
v2=g.V().has('id',14).next()
g.V(v1).addE("Serivces").to(v2).next()

but from python iam unable to add edge.

Thanks,
RLA.


On Thu, 21 May 2020 at 18:59, Raghavendar T S <raghav...@...> wrote:
I am not sure about the issue. But can you try adding label filter in the query for read operations.
E.g. g.V().hasLabel('LABEL').has('id',1).next()

Can you share the response for each of the queries separately with and without adding the label filter?

Thank you

On Thu, May 21, 2020 at 6:47 PM Real Life Adventure <srinu....@...> wrote:
 below schema i have used.
server= mgmt.makeVertexLabel('server').make()
Apps= mgmt.makeVertexLabel('Apps').make()
TagId= mgmt.makePropertyKey('TagId').dataType(String.class).make()
Partof= mgmt.makeEdgeLabel('Partof').make()

Thanks,
RLA. 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BXX1%3DsvOYNq7iqd9qBB5cTe5XEo5ptzPBDNGyYrip%3DoA%40mail.gmail.com.


--
Raghavendar T S

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CABmtsnn-HjU10dTF3wjEXw3yUhScT%3DFT%2B7%3DbREJSqy0kREj5kQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BSQRxa7RnkyDZTmVRCeebUqLNdJEBUHx60Am3Ft5_W4Q%40mail.gmail.com.


Real Life Adventure <srinu....@...>
 

Hi  Kevin,
     i tried transaction commit also. but it is throwing error as GraphTraversalSource object has no attribute 'tx'.
i have used g.tx().commit().

Thanks,
RLA.

On Thu, 21 May 2020 at 19:40, Kevin Schmidt <ktsc...@...> wrote:
Where/how are you doing the g.E().count()?  Is it in the same session/transaction as the add or different?

It is possible that you are doing the add in python and the check in gremlin console, but are not doing a commit in python and thus the add isn't visible to the transaction in gremlin console.  When you do the add and check in gremlin console, that is all in the same transaction and so it will be seen.

Try adding a g.tx().commit() to your python code and see what happens.

Kevin

On Thu, May 21, 2020 at 7:01 AM Real Life Adventure <srinu....@...> wrote:
i am able to add edge from gremlin console.
please see below commands successfully added edge from gremlin console.
v1=g.V().has('id',2).next()
v2=g.V().has('id',14).next()
g.V(v1).addE("Serivces").to(v2).next()

but from python iam unable to add edge.

Thanks,
RLA.


On Thu, 21 May 2020 at 18:59, Raghavendar T S <raghav...@...> wrote:
I am not sure about the issue. But can you try adding label filter in the query for read operations.
E.g. g.V().hasLabel('LABEL').has('id',1).next()

Can you share the response for each of the queries separately with and without adding the label filter?

Thank you

On Thu, May 21, 2020 at 6:47 PM Real Life Adventure <srinu....@...> wrote:
 below schema i have used.
server= mgmt.makeVertexLabel('server').make()
Apps= mgmt.makeVertexLabel('Apps').make()
TagId= mgmt.makePropertyKey('TagId').dataType(String.class).make()
Partof= mgmt.makeEdgeLabel('Partof').make()

Thanks,
RLA. 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BXX1%3DsvOYNq7iqd9qBB5cTe5XEo5ptzPBDNGyYrip%3DoA%40mail.gmail.com.


--
Raghavendar T S

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CABmtsnn-HjU10dTF3wjEXw3yUhScT%3DFT%2B7%3DbREJSqy0kREj5kQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CALQop5%2BSQRxa7RnkyDZTmVRCeebUqLNdJEBUHx60Am3Ft5_W4Q%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/CAJFiCb8RdV1pt17CMOcjqVOvkF7NahNMzAGoNP6ObJV9CCNC_w%40mail.gmail.com.