Hello, 

I am trying to save data from spark to Cassandra.

So I have an ScalaESRDD (because i take data from elasticsearch) that
contains a lot of key/values like this :

(AU16r4o_kbhIuSky3zFO , Map(@timestamp -> 2015-05-21T21:35:54.035Z, 
timestamp -> 2015-05-21 23:35:54,035, loglevel -> INFO, thread -> 
ajp-crmprod-fr-003%2F10.2.53.39-8009-178, ID_Echange -> 1432244153901,
SessionID -> -, ProcessID -> 1432244149a998000f00000000024390, IP ->
37.163.216.219, proxy -> 37.163.216.219, ContactID -> 2255701356, Login ->
46711205, messageType -> <<))

(AU16r4o_kbhIuSky3zFT , Map(@timestamp -> 2015-05-21T21:35:55.450Z,
timestamp -> 2015-05-21 23:35:55,450, loglevel -> INFO, thread -> 
ajp-crmprod-fr-003%2F10.2.53.39-8009-168, ID_Echange -> 1432244155381,
SessionID -> 76c8ad0dc9c86840cf1ff078911a6040, ProcessID ->
1432244154a435000f00000000024680, IP -> 82.240.167.71, proxy ->
82.240.167.71, ContactID -> 2816846047, Login -> 14642027, messageType ->
<<))

So there is a key and a map as value. 
What I want to do is to put each Key/Value on a cassandra table. I used
saveToCassandra() but it is not exactly what I wish because after this I
have a table with the key and the map but it is not possible to do queries
on a map in Cassandra (so it is useless). 
So I want to put data in order to be able to query the map.

I thought about create a user type but how can I save the map in a user type
for each Key/Value ? 

I hope it is clear, 

Thank you very much for you help.

Best Regards,





--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Spark-Cassandra-tp23065.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to