spark 图计算 助力解决 dataframe中的链式依赖

链式依赖说明

name   newName
a        b
c        d
b        c

我们需要的结果

即我们可以支持获取到链式转换的 起点 重点 以及链式的中间转换过程顺序数组.

特别说明: 出版只支持  单向 无分叉的图,其他复杂场景暂时未测试.

场景举例: 比如某件商品价格变化,我们需要知道变化轨迹以及初始 价格,当前价格等.

name   newName  beginName finalName nameChangeChain
a        b        a        d        [a,b,c,d]
c        d        a        d        [a,b,c,d]
b        c        a        d        [a,b,c,d]

graphframe安装

下载:

spark 图计算 助力解决 dataframe中的链式依赖_第1张图片

 安装到本地仓库:

win下需要所有参数加引号 否则报错: The goal you specified requires a project to execute but there is no POM in this directory

 mvn install:install-file "-Dfile=C:/Users/yy/Downloads/graphframes-0.8.1-spark3.0-s_2.12.jar"   "-DgroupId=graphframes"  "-DartifactId=graphframes" "-Dversion=0.8.1-spark3.0-s_2.12" 

你可能感兴趣的:(总结,spark,大数据,分布式)