on 07-02-2015 2:06 AM
Hi,
We have a HANA view which uses input parameters, and this is exposed as an xsodata service, which also uses input parameters. The URL looks like this. For a single value the following syntax would be used:
http://hana:8000/data/view.xsodata/InputParams(i_var='1')/Results?$format=json
If there are multiple values for the variable, the following syntax is used.
The PO OData adapter works with a single value but fails with multiple values, with the following:
Error org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The metadata constraints [Nullable=false, DefaultValue=1, MaxLength=8] do not match the literal 1,2,3,4,5.
So PO is complaining that it thinks that the actual variable value is '1,2,3,4,5' rather than 5 separate values. Is this a PO bug, or is HANA breaking the OData format? Or just an integration issue between the two products? I'd sure appreciate any ideas on what to do.
Thanks!
John
hi John,
do you have a resource called InputParams? - because it seems rather an odd name for a resource.. also, I don't understand how one field (the key) can either be one value or an array value - wouldn't it be simpler to use a function import and pass your variable as a normal query parameter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As the error saying, 'metadata constraints ' and OData adapter usually downloads the edmx file at runtime.
I guess its problem in the edmx file, that means in the HANA view.
reg, avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So if we go to the OData 4.0 specification: http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html
I can't find any usage like InputParams(i_var='1'',''2'',''3'',''4'',''5') in the spec. My guess is that HANA XS is breaking the OData specification here, which is why PI can't parse it.
It's possible that XS isn't even supposed to allow this and the usage is an undocumented feature, as I can't find reference to it in the documentation.
Looks like the solution would be to use the REST adapter and craft the URL programmatically in PI.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.