7 Replies Latest reply on Jun 5, 2018 4:19 PM by Ramesh Reddy

    Teiid - oData problem with variadic input

    Angel Addatu Newbie

      Hello:

       

      I need define 1..n input in some virtual procedure in the VDB. So I use the VARIADIC input option. It works with Squirrel but It doesn't work with oData access. Do you have any suggestion?

       

      I try:

      ?z=[1,2]

      ?z=1&z=2

      ?z=(1,2)

      etc...

       

      Thank you so much for your support.

       

      Regards.


      Angel

       

      Example:

       

      CREATE VIRTUAL PROCEDURE PROC_PRUEBA3 (VARIADIC z string) returns TABLE(x string) OPTIONS (VARARGS 'true')

      AS

      BEGIN

      DECLARE integer i;

      i = 1;

      CREATE LOCAL TEMPORARY TABLE tpruebita (columna1 string);

      WHILE (i <=array_length(z))

      BEGIN

      INSERT INTO tpruebita (columna1) VALUES (array_get(z, i));

      i = i+1;

      END

      select * from tpruebita;

      DROP TABLE tpruebita;

      END;