Skip to content

Instantly share code, notes, and snippets.

@chbatey
Last active August 29, 2015 14:15
Show Gist options
  • Save chbatey/1286acb7dd2bf70873ec to your computer and use it in GitHub Desktop.
Save chbatey/1286acb7dd2bf70873ec to your computer and use it in GitHub Desktop.
val conf = new SparkConf().set("spark.cassandra.connection.host", cassandraHost)
val sc = new SparkContext(sparkMaster, "CassandraSchemaMigration", conf)
val events_by_customer = sc.cassandraTable("keyspace", "customer_events")
events_by_customer.saveToCassandra("keyspace", "customer_events_by_staff",
SomeColumns("customer_id", "time", "id", "event_type", "staff_name", "staff_title",
"store_location", "store_name", "store_type"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment