Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大型 TSV 数据文件,其中包含汇总在一起的事实表及其维度表。我想知道是否可以通过 Spark 将单个文件划分/分区为不同的“表”,然后执行连接以规范化它们?
任何为我指明正确方向的帮助都会很棒。
在 baseRDD 上应用过滤器以获取 factRDD 和维度RDD,然后您可以对它们进行连接。
val baseRDD = sc.textFile("...") val factRDD = baseRDD.filter(func1) val dimensionsRDD = baseRD.filter(func2) factRDD.join(dimentionsRDD)