Class UDAFRegistration


  • public class UDAFRegistration
    extends java.lang.Object
    Provides methods to register a UDAF (user-defined aggregate function) in the Snowflake database. Session.udaf() returns an object of this class.
    Since:
    1.19.0
    • Method Detail

      • registerTemporary

        public AggregateFunction registerTemporary​(JavaUDAF udaf)
        Registers a UDAF instance as an anonymous temporary Snowflake UDAF that you plan to use in the session.
        Parameters:
        udaf - The UDAF instance to be registered
        Returns:
        An AggregateFunction that represents the corresponding FUNCTION created in Snowflake
        Since:
        1.19.0
      • registerTemporary

        public AggregateFunction registerTemporary​(java.lang.String funcName,
                                                   JavaUDAF udaf)
        Registers a UDAF instance as a temporary Snowflake UDAF that you plan to use in the session.
        Parameters:
        funcName - The name that you want to use to refer to the UDAF.
        udaf - The UDAF instance to be registered
        Returns:
        An AggregateFunction that represents the corresponding FUNCTION created in Snowflake
        Since:
        1.19.0
      • registerPermanent

        public AggregateFunction registerPermanent​(java.lang.String funcName,
                                                   JavaUDAF udaf,
                                                   java.lang.String stageLocation)
        Registers a UDAF instance as a Snowflake UDAF.
        Parameters:
        funcName - The name that you want to use to refer to the UDAF.
        udaf - The UDAF instance to be registered.
        stageLocation - Stage location where the JAR files for the UDAF and its dependencies should be uploaded
        Returns:
        An AggregateFunction that represents the corresponding FUNCTION created in Snowflake
        Since:
        1.19.0