Minimal read only DseGraphFrame implementation that wraps a GraphFrame to run traversal.
Minimal read only DseGraphFrame implementation that wraps a GraphFrame to run traversal. Update and delete methods are not supported and will throw a NotImplementedError.
Provides DSE Graph-specific methods on GraphFrames.
Provides DSE Graph-specific methods on GraphFrames.
A DseGraphFrame
requires a graphName
for creating some traversal steps and for writing data back to DSE.
Implicit conversions ensure the graphName
is preserved or reassigned since it can be lost during a
DseGraphFrame->GraphFrame->DseGraphFrame transition chain.
wrap vertex data frame to implement TinkerPop functions
Provides DSE-specific methods on SparkSession
Usage: val dataFrame = DseGraphFrameBuilder("graph", spark).dataFrame()
The spark-shell show may show an "ambiguous reference to overloaded definition" error for two functions:
GraphTraversal.by(Order)
and GraphTraversal.by(Comparable)
The spark-shell show may show an "ambiguous reference to overloaded definition" error for two functions:
GraphTraversal.by(Order)
and GraphTraversal.by(Comparable)
Here is an example:
scala> g.V().values("name").order().by(Order.decr) console>:43: error: ambiguous reference to overloaded definition, both method by in trait GraphTraversal of type (x$1: org.apache.tinkerpop.gremlin.process.traversal.Order)org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal[org.apache.spark.sql.Row,E2] and method by in trait GraphTraversal of type (x$1: java.util.Comparator[E2])org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal[org.apache.spark.sql.Row,E2] match argument types (org.apache.tinkerpop.gremlin.process.traversal.Order)
To workaround this problem a user can directly cast Order to super class: Comparable
scala> g.V().values("name").order().by(Order.decr.asInstanceOf[Order])
This is an inconvenient workaround, so this class replicates the Order interface but returns Comparable instead of Order. Users should import this object to avoid the aforementioned issues.
add all DataFrame functions to DseGraphTraversal
The root package of DSE GraphFrame support. Offers handy implicit conversions that add DSE-specific methods to SparkSession and GraphFrame.
Call dseGraph method on the SparkSession object to create a GraphFrame exposing DSE Graph as Spark GraphFrame.
Example: