-
1. Re: LIMIT in virtual procedure
gioppoluca Jul 23, 2013 4:58 AM (in response to gioppoluca)TEIID Designer version 8.1 beta
-
2. Re: LIMIT in virtual procedure
shawkins Jul 23, 2013 3:45 PM (in response to gioppoluca)Logically that should be allowed as it's functionally the same as allowing a prepared parameter. An enhancement would be needed though as the parser is not looking for a variable reference. Can you log something?
The workaround would be to use a dynamic query.
Steve
-
-
4. Re: LIMIT in virtual procedure
gioppoluca Jul 24, 2013 5:58 PM (in response to shawkins)Thanks Steven,
does this also affect designer and the validation at transformation editor level?
At which nightly build will it be merged?
Also can you shed an example of dynamic query with LIMIT?
Also since I want to implement a REWST api pagination using the LIMIT and the offset as REST parameters and I want to generate the rest war using Designer I could generate the WAR with the procedure without LIMIT (so I do not get errors and the generator works) and than creating the dyamic query with the same name and substitute the VDB at deployment time?
Thanks
Luca
-
5. Re: LIMIT in virtual procedure
shawkins Jul 24, 2013 8:07 PM (in response to gioppoluca)> does this also affect designer and the validation at transformation editor level?
Yes, Designer has to pick up the corresponding engine bits to support the language features at runtime.
> At which nightly build will it be merged?
I can't really say. It will be a while before they pick up an 8.5 build and I don't think there will be a community release against Teiid 8.4.1.
> Also can you shed an example of dynamic query with LIMIT?
See https://docs.jboss.org/author/display/TEIID/Procedure+Language
EXECUTE IMMEDIATE 'SELECT XMLELEMENT(NAME alberate, ... LIMIT' || AlberataView.AlberataRest."limit" AS COL XML;
> Also since I want to implement a REWST api pagination using the LIMIT and the offset as REST parameters
The OData layer uses result caching for more efficent paging. Such that at a user scope for a specified time limit the entire result is cached and subsets are returned as the pages. Adding a cache hint to a query within a procedure however isn't a supported use of the cache hint. But an enhancement would be warrented for situations like this.