Search code examples
odataavrohanahana-xs

How to use oData interface options with Avro similar to JSON format for exposing the data


I have created an XSOdata service in SAP HANA and the external system needs in AVRO format rather than JSON format.

JSON format looks like below with a link and its developments on a HANA Calculation view:

https://HANA_SERVER/package_name/XSODATA_NAME.xsodata/name_event?$format=json

XSODATA_NAME.xsodata file contains:

service {
"package_name::CA_CALC_VIEW" as "name_event"
keys generate local "ID"                            
aggregates always;
}

.xsapp

{}

.xsaccess

{"exposed":true}

Could you please suggest on how to expose a XSOData as AVRO format. Thanks in advance.

Best Regards,


Solution

  • The built-in Odata services (and also the service generators) don’t support the AVRO format. If you want to expose data via this format, a custom OData service implementation is required, that is, you would have to either develop it yourself or find a 3rd party implementation that you can use.