UDF functions in Thrift JDBC SQL connection for client requests

64 views
Skip to first unread message

Awadhesh Kumar

unread,
Jun 7, 2018, 12:21:35 AM6/7/18
to DataStax Spark Connector for Apache Cassandra
We are storing hash information for one of the Cassandra column and want to access the same column using hash input via SQL query. Since this hashing mechanism is not available with Spark Thrift so we want to register a UDF function to calculate the hash in SQL query. Is it supported in Spark Thrift server? Is there other option available in Spark Thrift to pass custom function from SQL client to Thrift and then Cassandra cluster?

Note - Here we are calculating hash from String and then doing modulo with 1000 to limit the partition key in cluster.

Russell Spitzer

unread,
Jun 7, 2018, 2:05:15 AM6/7/18
to spark-conn...@lists.datastax.com
Yes registering udfs is allowed in the thrift server. Since it is based on Hiveserver 2 these instructions should work https://www.cloudera.com/documentation/enterprise/5-9-x/topics/cm_mc_hive_udf.html

On Wed, Jun 6, 2018 at 9:21 PM Awadhesh Kumar <awadhes...@gmail.com> wrote:
We are storing hash information for one of the Cassandra column and want to access the same column using hash input via SQL query. Since this hashing mechanism is not available with Spark Thrift so we want to register a UDF function to calculate the hash in SQL query. Is it supported in Spark Thrift server? Is there other option available in Spark Thrift to pass custom function from SQL client to Thrift and then Cassandra cluster?

Note - Here we are calculating hash from String and then doing modulo with 1000 to limit the partition key in cluster.

--
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.
--

Russell Spitzer
Software Engineer




Reply all
Reply to author
Forward
0 new messages