g.inject(dicts).unfold().as_('dict') \ .addV('obj') \ .property('a', select('a')) \ .property('b', select('b')) \ .property('c', select('c')) \ .property('d', select('d')) \ .property('e', select('e')) \ .as_('obj_vertex') \ .coalesce( V().hasLabel('att').has('type', 'a') \ .where(eq('dict')).by('value').by(select('a')), addV('att') \ .property('type', 'a') \ .property('value', select('dict').select('a'))) \ .as_('a_vertex') \ .addE('a').from_('obj_vertex').to('a_vertex') \ .addE('a').from_('a_vertex').to('obj_vertex') \ .coalesce( V().hasLabel('att').has('type', 'b') \ .where(eq('dict')).by('value').by(select('b')), addV('att') \ .property('type', 'b') \ .property('value', select('dict').select('b'))) \ .as_('b_vertex') \ .addE('b').from_('obj_vertex').to('b_vertex') \ .addE('b').from_('b_vertex').to('obj_vertex') \ .coalesce( V().hasLabel('att').has('type', 'c') \ .where(eq('dict')).by('value').by(select('c')), addV('att') \ .property('type', 'c') \ .property('value', select('dict').select('c'))) \ .as_('c_vertex') \ .addE('c').from_('obj_vertex').to('c_vertex') \ .addE('c').from_('c_vertex').to('obj_vertex') \ .coalesce( V().hasLabel('att').has('type', 'd') \ .where(eq('dict')).by('value').by(select('d')), addV('att') \ .property('type', 'd') \ .property('value', select('dict').select('d'))) \ .as_('d_vertex') \ .addE('d').from_('obj_vertex').to('d_vertex') \ .addE('d').from_('d_vertex').to('obj_vertex') \ .coalesce( V().hasLabel('att').has('type', 'e') \ .where(eq('dict')).by('value').by(select('e')), addV('att') \ .property('type', 'e') \ .property('value', select('dict').select('e'))) \ .as_('e_vertex') \ .addE('e').from_('obj_vertex').to('e_vertex') \ .addE('e').from_('e_vertex').to('obj_vertex').iterate()
g.V().hasLabel('att').as('v').group('m').by('type').by(group().by('value')).cap('m').constant(dicts).unfold().as('dict').addV('obj').as('v').sideEffect(select('dict').unfold().as('kv').select('v').property(select('kv').by(keys), select('kv').by(values))).properties().as('p').coalesce(select('m').select(select('p').by(key)).select(select('p').by(value)).unfold(),addV('att').property('type', select('p').by(key)).property('value', select('p').by(value)).group('m').by('type').by(group().by('value'))).addE('has_att').property('name', select('p').by(key)).from('v').iterate()
dicts = [["a":"foo1","b":"bar","c":1],["a":"foo1","b":"baz","c":5]]
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/f563a2d6-fd61-40f9-90d6-5659ef1f3e8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seVYWr0ATugD7e8drHvTYK0Uw%2B48Y8XSsymw44_XymxWUg%40mail.gmail.com.
gremlin_python.driver.protocol.GremlinServerError: 599: {"requestId":"ca96155f-deef-45dd-8261-c04688d0394f","code":"InternalFailureException","detailedMessage":"Could not locate method: DefaultGraphTraversal.select([[SelectOneStep(last,p,key)]])
Enter code here...
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/f563a2d6-fd61-40f9-90d6-5659ef1f3e8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
The primary thing I'm interested in at the moment speeding up the latency to insert one dict object into the graph
gremlin> m = ['foo':'bar','ping':'pong']==>foo=bar==>ping=ponggremlin> t = g.addV(); m.each {k, v -> t.property(k, v)}; [t.bytecode, t.toString()]==>[[], [addV(), property(foo, bar), property(ping, pong)]]==>[AddVertexStartStep({ping=[pong], foo=[bar]})]
... it seems to be something in the coalesce() step
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2d6faaf7-aaf7-4d1a-bb61-409d53e9766e%40googlegroups.com.