cancel
Showing results for 
Search instead for 
Did you mean: 

XSODATA - KEY COLUMN

Former Member
0 Kudos

Hello All

How to make a column of analytic view as key column in the xsodata instead of creating a pseudo key column in xsodata? Is it possible to combine the columns of a analytic view to form a key in xsodata ?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

sreehari_vpillai
Active Contributor
0 Kudos

You can call the URL as below

get Entity set : package path/filename.xsodata/MyEntity

getEntity : package path/filename.xsodata/MyEntity(Column1='Value 1',Column2='Value2')


Before constructing the url, you can check the metadata page for key details as well.

Ref : Home | Open Data Protocol

Sreehari

Former Member
0 Kudos

Thanks Sreehari

It works, but the idea is to create a dynamic custom url using rewrite_rules, and pass the key value.

URL: package path/foldername1/foldername2/filename.xsodata/MyEntity(Column1='Value 1)


Custom URL: package path/filename/column1 value/


rewrite_rules:

package path/filename/(\\d+)/


If I have to create a dynamic url for passing the key value, how the target url should be constructed.


Thanks.


sreehari_vpillai
Active Contributor
0 Kudos

Hi Ram,

Try passing the url as : customURLPath(Column1='Value 1) , and in the re write rule, it should be re written as the proper target URL.

package path/foldername1/foldername2/filename.xsodata/MyEntity(Column1='Value 1)

ultimately, Odata url is just like any other URl

Sreehari

sreehari_vpillai
Active Contributor
0 Kudos

Hi,

you can follow the following syntax in xsoata file.

"Analytical view name" as "MyEntityt" key ("COLUMN1","COLUMN2");

Sreehari

Former Member
0 Kudos

Thanks Sreehari

I have defined xsodata as you suggested, what will be the syntax of the url construct to call by key ?

Thanks