使用 DseGraphFrame 添加边属性 API

Adding edge properties using DseGraphFrame API

如果我想添加带有属性的边作为数据框,属性数据应该是什么格式?我正在阅读这些 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);

应该是正确的 - 您必须有 3 列:srcdst~label。前两个是使用接受顶点标签和顶点 ID 作为参数的 idColumn 函数生成的。您可以在 DataStax-Examples.

following example 中看到

还有很多关于该主题的可用资源: