Hi, Is there a way to use to a user defined function/aggregate inside a ModelQuerySet? I browsed through the docs: https://datastax.github.io/python-driver/api/index.html but could not find anything related to this topic. If this is not possible, what are my other alternatives? Should I be defining an equivalent function in my python program that emulates what the user define function does?
PS: posted the same inquiry at the Cassandra mailing list: https://www.mail-archive.com/us...@cassandra.apache.org/msg53382.html
Cheers, Earl
--
You received this message because you are subscribed to the Google Groups "DataStax Python Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-driver-user+unsub...@lists.datastax.com.
Hello Earl,Here are your options to use UDF/UDA with the driver:1- Use the core-driver to execute your request:session.execute('SELECT my_user_function_or_agg(field_a) FROM test;')
2- For CQLEngine, you need to create a wrapper like the existing ones(Token, MinTimeUUID, MaxTimeUUID). See:
Also, you might prefer to write your user functions in Python directly rather than calling them on the server in some cases. e.g. There is not much benefit calling a function like `bigintAsBlob` since you will get the same result with a function defined at the application level.