1 Reply Latest reply on Jul 12, 2018 7:34 AM by Steven Hawkins

    REST POST and Native Query

    Mahavir Dhanadevan Newbie

      Hi Teiid Team,

       

      1. The oracle database supports WITHIN GROUP which is not supported by TEIID.

      2. So I have written a native query which is already working. I have created CREATE FOREIGN PROCEDURE for it.

      3. I am using a native query with IN operator or clause which is substituted from this procedure parameter (Ex WHERE param1 IN ($1) ).

      4. My Question is how to pass array of strings from REST POST body to this FOREIGN PROCEDURE.

       

      Please suggest is there any simple way to do this ?

       

      Thanks & Regards,

      Mahavir Dhanadevan

        • 1. Re: REST POST and Native Query
          Steven Hawkins Master

          "param1 IN ($1)" would bind just a single value.  If you bind an array value the sql should use something to unnest or otherwise search the array.

           

          > My Question is how to pass array of strings from REST POST body to this FOREIGN PROCEDURE.

           

          The Teiid rest layer supports single dimensional as comma separated lists - but it's very simple support there's no mechanism currently to escape commas in the values.