Class SProcRegistration


  • public class SProcRegistration
    extends Object
    Provides methods to register a SProc (Stored Procedure) in the Snowflake database.

    Session.sproc() returns an object ot this class.

    To register anonymous temporary SProcs with work in the current session:

    
     StoredProcedure sp =
       session.sproc().registerTemporary((Session session, Integer num) -> num + 1,
         DataTypes.IntegerType, DataTypes.IntegerType);
     session.storedProcedure(sp, 1).show();
     
    To register named temporary SProcs with work in the current session:
    
     String name = "sproc";
     StoredProcedure sp =
       session.sproc().registerTemporary(name, (Session session, Integer num) -> num + 1,
         DataTypes.IntegerType, DataTypes.IntegerType);
     session.storedProcedure(sp, 1).show();
     session.storedProcedure(name, 1).show();
     
    It requires a user stage when registering a permanent SProc. Snowpark will upload all JAR files for the SProc and any dependencies. It is also required to specify Owner or Caller modes via the parameter `isCallerMode`.
    
     String name = "sproc";
     String stageName = "stage";
     StoredProcedure sp =
       session.sproc().registerPermanent(
         name,
         (Session session, Integer col1) -> col1 + 100,
         DataTypes.IntegerType,
         DataTypes.IntegerType,
         stageName,
         true
       );
      session.storedProcedure(sp, 1).show();
      session.storedProcedure(name, 1).show();
     
    This object also provides a convenient methods to execute SProc lambda functions directly with current session on the client side. The functions are designed for debuging and development only. Since the local and Snowflake server environments are different, the outputs of executing a SP function with these test function and on Snowflake server may be different too.
    
     JavaSproc1<Integer, Integer> func =
       (Session session, Integer col1) -> col1 + 100;
     StoredProcedure sp =
       session.sproc().registerTemporary(func, DataTypes.IntegerType, DataTypes.IntegerType);
     int localResult = (Integer) session.sproc().runLocally(func, 1);
     DataFrame resultDF = session.storedProcedure(sp, 1);
     
    Since:
    1.8.0
    • Method Detail

      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc0<?> sp,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 0 argument as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc1<?,​?> sp,
                                                 DataType input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 1 argument as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataType
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc2<?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 2 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc3<?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 3 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc4<?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 4 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc5<?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 5 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc6<?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 6 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc7<?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 7 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc8<?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 8 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc9<?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 9 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc10<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 10 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc11<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 11 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc12<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 12 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc13<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 13 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc14<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 14 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc15<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 15 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc16<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 16 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc17<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 17 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc18<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 18 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc19<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 19 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc20<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 20 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerPermanent

        @PublicPreview
        public StoredProcedure registerPermanent​(String name,
                                                 JavaSProc21<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output,
                                                 String stageLocation,
                                                 boolean isCallerMode)
        Registers a Java Lambda of 21 arguments as a permanent Snowflake Stored Procedure.

        The function uploads the JAR files that the stored procedure depdends upon to the specified stage.

        Parameters:
        name - the name of the stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        stageLocation - a stage location that stored procedure jar files being uploaded to.
        isCallerMode - true if the stored procedure is under caller mode.
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc0<?> sp,
                                                 DataType output)
        Registers a Java Lambda of 0 argument as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc1<?,​?> sp,
                                                 DataType input,
                                                 DataType output)
        Registers a Java Lambda of 1 argument as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataType
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc2<?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 2 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc3<?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 3 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc4<?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 4 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc5<?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 5 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc6<?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 6 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc7<?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 7 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc8<?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 8 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc9<?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 9 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc10<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 10 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc11<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 11 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc12<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 12 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc13<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 13 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc14<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 14 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc15<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 15 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc16<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 16 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc17<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 17 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc18<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 18 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc19<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 19 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc20<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 20 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(JavaSProc21<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 21 arguments as a temporary anonymous Stored Procedure that is scoped to this session.
        Parameters:
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc0<?> sp,
                                                 DataType output)
        Registers a Java Lambda of 0 argument as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc1<?,​?> sp,
                                                 DataType input,
                                                 DataType output)
        Registers a Java Lambda of 1 argument as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataType
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc2<?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 2 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc3<?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 3 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc4<?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 4 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc5<?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 5 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc6<?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 6 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc7<?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 7 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc8<?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 8 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc9<?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 9 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc10<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 10 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc11<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 11 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc12<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 12 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc13<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 13 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc14<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 14 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc15<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 15 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc16<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 16 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc17<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 17 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc18<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 18 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc19<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 19 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc20<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 20 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • registerTemporary

        @PublicPreview
        public StoredProcedure registerTemporary​(String name,
                                                 JavaSProc21<?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?,​?> sp,
                                                 DataType[] input,
                                                 DataType output)
        Registers a Java Lambda of 21 arguments as a temporary named Stored Procedure that is scoped to this session.
        Parameters:
        name - the name of the temporary stored procedure being registered.
        sp - the Java Lambda to be registered.
        input - the SProc input types.DataTypes
        output - the SProc return types.DataType
        Returns:
        The result StoredProcedure reference
        Since:
        1.8.0
      • runLocally

        @PublicPreview
        public Object runLocally​(com.snowflake.snowpark_java.internal.JavaSProc sproc,
                                 Object... args)
        Executes a Stored Procedure lambda function with current Snowpark session in the local environment. This is a test function and used for debugging and development only. Since the local and Snowflake server environments are different, the outputs of executing a SP function with this test function and on Snowflake server may be different too.
        Parameters:
        sproc - a Java Stored Procedure lambda
        args - the arguments of this stored procedure
        Returns:
        the result of stored procedure.
        Since:
        1.8.0