-
1. Re: ODATA query to access stored procedure
lewis.watson May 29, 2014 9:41 AM (in response to iginsk)Hello Kiran.
I have a Teiid User Defined Function that links through to a PostgreSQL stored procedure and I find that I need to use
http://<host>:<port>/odata/<vdbname>/<functionname>?param1=x¶m2=y
In order to get data back something like
<d:Collection_VDBView_procedure_view.inc_NewProcedureResult_><d:element m:type="Collection(VDBView_procedure_view.inc_NewProcedureResult)"><d:returnValue m:type="Edm.Int32">3</d:returnValue></d:element></d:Collection_VDBView_procedure_view.inc_NewProcedureResult_>
When I try
http://<host>:<port>/odata/<vdbname>/<functionname(param1=x,param2=y)
I get
<error><code>NotFoundException</code><message lang="en-US">TEIID16011 EntitySet "inc" is not found; Check the spelling, use modelName.tableName; The table that representing the Entity type must either have a PRIMARY KEY or UNIQUE key(s)</message></error>
Hope this helps.
Lewis
-
2. Re: ODATA query to access stored procedure
shawkins May 29, 2014 7:00 PM (in response to lewis.watson)Yes, the paren syntax is for identifying an entity rather than invoking an OData function. See http://www.odata.org/documentation/odata-version-2-0/uri-conventions/ under Addressing Service Operations.