I have 2 tables which have a compound primary key like in picture..
My specific case is that when I have something like triple ids (11,15,21), I need to join a table with itself and with another one to get a result like in picture (joining on ID_1)..
Is there a way how to achieve this from cassandra so I can avoid zipping rdds in spark?
I used this code to make self table join but is there anything better?
val table1 = sc.cassandraTable("test", "table1") .select("ID_1", "ID_2") .where("ID_2 = ?", 11) .where("ID_1 IN ?", someValues) val joined = table1.joinWithCassandraTable("test", "table1") .on(SomeColumns("ID_1")) .where("ID_2 = ?", 15)