【发布时间】:2021-01-10 00:49:16
【问题描述】:
如果我想添加带有属性的边作为数据框,属性数据应该采用什么格式?我正在阅读这些docs,但它没有解决任何有关属性列格式的问题。
例如:
Dataset<Row> edgesToAdd = sparkDataSetContainingData
.select(
dseGraphFrame.idColumn(lit(srcLabel), col("sourceName")).as("src"),
dseGraphFrame.idColumn(lit(destLabel), col("destinationName")).as("dst"),
lit(inputEdgeLabel).as("~label"),
dseGraphFrame.idColumn("some_property_key", col("some_property_value")) // is this correct?
);
dseGraphFrame.updateEdges(edgesToAdd, true);
【问题讨论】: