Search code examples
datastax-enterprise-graph

DSE graph: update the graph in analytics mode


I have a DSE graph in production. I want to update the graph based on the result of an analytic query.

For instance, for each vertex of type 'user', I want to count the incident edges with label 'subscribes', to calculate the number of subscribers of a particular user of the graph.

The count can be easily done with an analytic query in analytic mode (in transactional mode the query can timeout if there is too many edges).

The problem is that in analytic mode I cannot use the computed value to update my model.

When I try to update my counter I get this message: "property addition is not supported".

A workaround could be to count the edges in analytic mode, then switch from analytical mode to transactional mode, and then I can update the counter: this is OK to update a counter on a single particular user, but it's not really practical if I want to update all the users of my graph.

Is there a standard way to update the graph based on the results of analytics queries?

Thank you!


Solution

  • Have you tried DSE Graph Frames for this solution? This may help with your goal.

    https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/graphAnalytics/dseGraphFrameOverview.html