3 Replies Latest reply on Jul 20, 2015 3:46 PM by Ramesh Reddy

    Can I insert the output of UDF in to a view table

    Prashanthi Kairuppala Novice

      Hello,

       

      I am writing a UDF to do some customization on data before they are inserted in to the Database.

       

      I can call the odata post URL by java url connection from UDF and insert the data.

       

      But is there a way I can take the output of UDF and send it to the table to insert?

       

      Any documentation on this process would very much helpful.

       

      Thanks,

      Prashanthi.

        • 1. Re: Can I insert the output of UDF in to a view table
          Ramesh Reddy Master

          Why are you using a UDF to insert data? Its very confusing to understand the flow of data from your comments above.

          • 2. Re: Can I insert the output of UDF in to a view table
            Prashanthi Kairuppala Novice

            Hi Ramesh,

             

            UDF is for data validation purpose and for custom logics to be applied on the data.

            I have update procedures to insert the data.

            Once the data is validated and all the logics are applied then I make a call to odata URL for insertion.

            I am trying to figure out if I can connect these two components without making a URL connections from UDF.

             

            Thanks,

            Prashanthi.

            • 3. Re: Can I insert the output of UDF in to a view table
              Ramesh Reddy Master

              UDF is for data validation purpose and for custom logics to be applied on the data.

              Get that. Where is this UDF? is this same as User Defined Functions - Teiid 8.12 (draft) - Project Documentation Editor ?

              I have update procedures to insert the data.

              Update procedures on a view? or virtual stored procedures that are doing updates?

              Once the data is validated and all the logics are applied then I make a call to odata URL for insertion.

              You lost me here. Are you saying you are validating the data out side the Teiid, then making a OData URL call for insert from your Java program?, or you have a virtual stored procedure in Teiid, which is applying the data validation using UDF, then you are issuing insert call inside this procedure, which you are executing using ODATA semantics from your JAVA program?

              I am trying to figure out if I can connect these two components without making a URL connections from UDF.

              Why is UDF making URL connections, for validating data? If yes, that does not concern Teiid. If no, why are you making URL connections here?

               

              Please note you may be working on the issue lot longer and have a clear picture of what you want to do, but without clear explanation of issue, it waste of both of our time if nothing else draw a picture of the flow.