can please me on below query. have rdd 5 columns. want join table in cassandra. knew there way using "joinwithcassandratable"
i see somewhere syntax use it. syntax: rdd.joinwithcassandratable(keyspace, tablename, somecolumns("cola","colb")) .on(somecolumns("colc"))
can please send me correct syntax??
i know mention column name of table key join.
joinwithcassandratable works pulling partition keys match rdd entries c* works on partition keys.
the documentation here https://github.com/datastax/spark-cassandra-connector/blob/master/doc/2_loading.md#using-joinwithcassandratable
and api doc here
the jwct table method can used without fluent api specifying arguments in method
def joinwithcassandratable[r]( keyspacename: string, tablename: string, selectedcolumns: columnselector = allcolumns, joincolumns: columnselector = partitionkeycolumns)
but fluent api can used
joinwithcassandratable[r](keyspace, tablename).select(allcolumns).on(partitionkeycolumns)
these 2 calls equivalent
your example
rdd.joinwithcassandratable(keyspace, tablename, somecolumns("cola","colb")) .on(somecolumns("colc"))
uses object rdd
join against colc
of tablename
, returns cola
, colb
join results.