You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by pratik khadloya <ti...@gmail.com> on 2015/11/04 21:44:33 UTC

PairRDD from SQL

Hello,

Is it possible to have a pair RDD from the below SQL query.
The pair being ((item_id, flight_id), metric1)

item_id, flight_id  are part of group by.

SELECT
  item_id,
  flight_id,
  SUM(metric1) AS metric1
FROM mytable
GROUP BY
  item_id,
  flight_id


Thanks,
Pratik