In [ ]:
%dep
z.load("alvsanand:spark-generic-connector:0.2.0-spark_2x-s_2.11")
In [ ]:
import org.apache.spark.streaming.sgc._
import es.alvsanand.sgc.google.dcm_data_transfer._
import es.alvsanand.sgc.google.dcm_data_transfer.DataTransferFileTypes.DataTransferFileType
In [ ]:
val parameters = DataTransferParameters("CREDENTIALS_ZIP_URL", "DATA_TRANSFER_BUCKET_NAME")
In [ ]:
val parameters = DataTransferParameters("CREDENTIALS_ZIP_URL", "DATA_TRANSFER_BUCKET_NAME",
Seq[DataTransferFileType](DataTransferFileTypes.ACTIVITY, DataTransferFileTypes.IMPRESSION))
In [ ]:
val rdd = sc.createSgcRDD(DataTransferSgcConnectorFactory, parameters)
In [ ]:
rdd.partitions.map(_.asInstanceOf[SgcRDDPartition[DataTransferSlot]].slot)
rdd.take(10).foreach(println)