User-defined functions (UDFs) and user-defined aggregates (UDAs)

User-defined functions and aggregates examples used in the CQL documentation.

Requires setting the https://docs.datastax.com/en/dse/6.8/dse-admin/datastax_enterprise/config/configCassandra_yaml.html#configCassandra_yamlenable_user_defined_functions[enable_user_defined_functions] and https://docs.datastax.com/en/dse/6.8/dse-admin/datastax_enterprise/config/configCassandra_yaml.html#configCassandra_yamlenable_scripted_user_defined_functions[enable_scripted_user_defined_functions] to true in the cassandra.yaml file.

flog

User-defined function.

left

Create a user-define function that trims row data from the left.

left

Create a user-define function that is an intermediate average state.

left

Create a user-define function that is a final average state.

Cycling user-defined aggregate team_average

Creates a Java user-defined aggregate function that calculates the average of a target column. Uses the average_state and average_final functions.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com