case class PropertyGraphFrame(vertexPropertyGroups: Seq[VertexPropertyGroup], edgesPropertyGroups: Seq[EdgePropertyGroup]) extends Product with Serializable
A high-level abstraction for working with property graphs that simplifies interaction with the GraphFrames library.
PropertyGraphFrame serves as a logical structure that manages collections of vertex and edge property groups, providing a user-friendly API for graph operations. It handles various internal complexities such as:
- ID conversion and collision prevention
- Management of directed/undirected graph representations
- Handling of weighted/unweighted edges
- Data consistency across different property groups
The class maintains separate collections for vertex and edge properties, allowing for flexible graph construction while ensuring data integrity. Each property (vertex or edge) handles its data internally, while this class provides a simplified interface for working with the underlying GraphFrame structure.
- vertexPropertyGroups
Sequence of vertex property groups that define the graph's vertices
- edgesPropertyGroups
Sequence of edge property groups that define the graph's edges
- Alphabetic
- By Inheritance
- PropertyGraphFrame
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
PropertyGraphFrame(vertexPropertyGroups: Seq[VertexPropertyGroup], edgesPropertyGroups: Seq[EdgePropertyGroup])
- vertexPropertyGroups
Sequence of vertex property groups that define the graph's vertices
- edgesPropertyGroups
Sequence of edge property groups that define the graph's edges
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to any2stringadd[PropertyGraphFrame] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (PropertyGraphFrame, B)
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to ArrowAssoc[PropertyGraphFrame] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val edgesPropertyGroups: Seq[EdgePropertyGroup]
-
def
ensuring(cond: (PropertyGraphFrame) ⇒ Boolean, msg: ⇒ Any): PropertyGraphFrame
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to Ensuring[PropertyGraphFrame] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (PropertyGraphFrame) ⇒ Boolean): PropertyGraphFrame
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to Ensuring[PropertyGraphFrame] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): PropertyGraphFrame
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to Ensuring[PropertyGraphFrame] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): PropertyGraphFrame
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to Ensuring[PropertyGraphFrame] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
joinVertices(verticesData: DataFrame, vertexGroups: Seq[String]): DataFrame
Joins the vertices data with the specified vertex property groups to produce a unified DataFrame.
Joins the vertices data with the specified vertex property groups to produce a unified DataFrame. Each vertex property group defines how the data should be structured and filtered.
- verticesData
The DataFrame containing the vertices data to join. It must include vertex properties and the group identifiers to filter and map. It is expected to be an output of calling graph algorithms on GraphFrame, made by the method toGraphFrame.
- vertexGroups
A sequence of vertex group names that are to be joined. Each name must correspond to a valid vertex property group defined in the PropertyGraphFrame.
- returns
A DataFrame representing the unified vertices data where each group has been appropriately filtered, joined, and processed based on its configuration.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
projectionBy(leftBiGraphPart: String, rightBiGraphPart: String, edgeGroup: String, newEdgeWeight: Option[(Column, Column) ⇒ Column] = None): PropertyGraphFrame
Projects a bipartite graph onto one of its parts, creating edges between vertices that share neighbors in the other part.
Projects a bipartite graph onto one of its parts, creating edges between vertices that share neighbors in the other part. Drops the property group used for projection through and returns a new property graph.
- leftBiGraphPart
Name of the vertex property group to project onto
- rightBiGraphPart
Name of the vertex property group to project through
- edgeGroup
Name of the edge property group connecting the two parts
- newEdgeWeight
Optional function that takes two weight columns (Column objects) of edges as input and returns a new weight column. If None, a default weight of 1.0 is used for all projected edges.
- returns
A new PropertyGraphFrame containing the projected graph
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toGraphFrame(vertexPropertyGroups: Seq[String], edgePropertyGroups: Seq[String], edgeGroupFilters: Map[String, Column], vertexGroupFilters: Map[String, Column]): GraphFrame
Converts a heterogeneous property graph into a unified GraphFrame representation.
Converts a heterogeneous property graph into a unified GraphFrame representation.
This method transforms a property graph that may contain multiple vertex types and both directed and undirected edges into a single GraphFrame object where all vertices and edges share the same schema. The conversion process handles:
- Internal ID generation and collision prevention by hashing vertex/edge IDs with their group names
- Merging of different vertex types into a unified vertex DataFrame
- Conversion of directed/undirected edge relationships into a consistent edge DataFrame
- Filtering of vertices and edges based on provided predicates
The method allows selecting a subset of property groups and applying filters to control which data is included in the final GraphFrame.
- vertexPropertyGroups
Sequence of vertex property group names to include in the GraphFrame
- edgePropertyGroups
Sequence of edge property group names to include in the GraphFrame
- edgeGroupFilters
Map of edge property group names to filter predicates (Column expressions)
- vertexGroupFilters
Map of vertex property group names to filter predicates (Column expressions)
- returns
A GraphFrame containing the unified representation of the selected and filtered property groups
- val vertexPropertyGroups: Seq[VertexPropertyGroup]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (PropertyGraphFrame, B)
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to ArrowAssoc[PropertyGraphFrame] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from PropertyGraphFrame to StringFormat[PropertyGraphFrame] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.