on 01-21-2016 6:01 PM
Hello experts,
I have an assignment, Where the data is stored in jsonapi and we are importing to HANA DB.
I have imported the data (1 row) from jsonapi into HANADB using xsjs, Referred from scn
I would like to know how to import multiple records at a time into hana using xsjs.
2) I also have One more question, what are the dfifferences between xsjs and OData.
Thanks in Advance,
vinni
Vinni,
welcome to sap hana and specifically to xs.
you may be able to import multiple records to HANA if you use a stored procedure and call it from your xs app. your stored procedure should have an input param of a table type. this table type may contain 1+ records so you can perform the insert in HANA db.
the difference between xsodata and xsjs..
xsodata is the odata layer for HANA. you may expose vies and tables from xsodata.. you will need to know syntax on how to expose, query, filter, aggregate data. the response can be json or xml.
xsjs- server side javascript.. its your server side layer on the xs engine that allows you to post, get, etc... as a web service.
what is your scenario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergio,
It was very helpful.
My scenario is, we want to import the data from third party api which is in json format into HANA DB. There are multiple rows to be imported.
I would like to know the procedure for this
Could you help me out with the steps / provide any supporting documents.
Thanks in Advance,
Shravya
Vinni,
there may be different ways. one which I have done would be that you create a XSJS service that takes a json payload and calls a stored procedure.
check out this blog post
kindly, Please mark questions correct or helpful.
as far as JavaScript.. the xsjs code you see is server side JavaScript. as far as client side JavaScript, you can see any JavaScript code training such as open.sap.com, code academy, w3 schools, etc. the client side JS is the same.. the server side JS is specific to HANA as it uses a server side JS library.
User | Count |
---|---|
76 | |
10 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.