Skip to content

Instantly share code, notes, and snippets.

@gtopper
Created May 20, 2015 11:28
Show Gist options
  • Save gtopper/6960a801a1acb92dcced to your computer and use it in GitHub Desktop.
Save gtopper/6960a801a1acb92dcced to your computer and use it in GitHub Desktop.
import com.typesafe.config.ConfigFactory
import org.joda.time.DateTime
import com.datastax.spark.connector._
implicit val config = ConfigFactory.load()
//val rdd = RawEventsReader2.getDataFromRange(sc)(new DateTime(2015, 5, 15, 4, 0), new DateTime(2015, 5, 15, 4, 0))
val keySpace = "offlinedb"
val tableName = "raw_events_2015_20"
val keys = "201505150400001976"
val rdd = sc.cassandraTable(keySpace, tableName).where(s"date_time IN ($keys)")
rdd.count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment