Basically I want a UDF, so that I can use it in
val df: DataFrame
// returning a Column
val murmur3Partition = create_cass_partition_udf(keyspace, table)
df.repartition(n, murmur3partition(rowKey_columns))
.write
.format("org.apache.spark.sql.cassandra")
.options(...)
.save()
Does such a function exist in spark-cassandra-connector?
I believe the function is simple, just get the partition column, compute token, compare with the token ranges, finally generate a number.
CassandraPartitioner seems for this purpose. There are too many concepts I am familiar with so I could not figure out how to do that by myself quickly.
Thanks.
--
You received this message because you are subscribed to the Google Groups "DataStax Spark Connector for Apache Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spark-connector-...@lists.datastax.com.