cancel
Showing results for 
Search instead for 
Did you mean: 

In Sap hana -09 Does Hana XS have a built-in XML parser? If not, what's approach to process xml in XS?

Former Member
0 Kudos

in hana 09 does hana xs hava a build in xml parser, how to pass a xml file to hana data base

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There are examples of using the parser in the online help:

http://help.sap.com/hana/SAP_HANA_XS_JavaScript_API_Reference_en/$.util.SAXParser.html

However your question was about passing an xml file to the database.  What exactly did you mean here. The XML parsing is done at the XS layer not in the SQL or DB layer itself.  Did you want to know how to store XML or is uploading from the client side your real question?  Some more details would be helpful.

Former Member
0 Kudos

Thanks for the replay Thomas i am using hana trial version and I want to import a large XML file into HANA. Is there a way of doing that using something other than HANA Studio ? Like XSJS ? & the xml is uploading from the client side. will it be efficient.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes you can do a file upload with XSJS.  It probably won't be any more efficient than uploading via the Studio from a technical standpoint. In fact if the file is very large it could exceed the memory limitations of the JavaScript VM within XS.  It isn't sized for very large (Gigabytes of data) processing.

Former Member
0 Kudos

Hi thomas,

I have  project where user uploads XML files via a web UI. I have to take this XML and put it into HANA. Also need to create column names based on the XML fields. Can this be done using XSJS, Odata? and what would be the size constraints?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes this is possible.  You can of course upload a file from the client side to XSJS and process it however you like on the server side. You can store it in the database as a CLOB/BLOB or parse it using the APIs I linked to earlier. After parsing the XML you can create tables/columns using SQL from XSJS of course. The size constraints would probably 300-400Mb files or less. That's quite large for XML actually. Anything larger and you would need special configuration on the XSEngine otherwise you will exceed the maximum memory size of the JavaScript VM.

Former Member
0 Kudos

thanks thomas that was a great help

Former Member
0 Kudos

Hi Thomas,

May I know is there any way to upload the bulk XMl file into the hana and suggest me any data services provided to do this

Former Member
0 Kudos

Hi Thomos Jung,

Could you guide me In a particular scenario  i need to "Get  huge XML data  into Hana."

Using Odata services can we handle huge data (i.e create schema/load into Hana) On-the-fly ?

In my scenario,

I get a folder of different complex XML files which are to be loaded into Hana database.

Then I gotta transform & cleanse the data.

Can I use oData services to transform and cleanse the data ?

If so, how can I create oData services dynamically ?

Any help is highly appreciated.

Thank you.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

When you talk about mass importing and cleansing of data I think you should look at a solution like SAP Data Services (SAP Data Services 4.2 – SAP Help Portal Page) instead of trying to write it all yourself from scratch.

henrique_pinto
Active Contributor
0 Kudos

Or use the native HANA EIM capabilities (Smart Data Integration), which I believe would be better in this case where DS is not part of the landscape yet (supposedly).

More details:

SAP HANA Enterprise Information Management Configuration Guide - SAP Library

Former Member
0 Kudos

Hello Thomas,

I read your comment on parsing an XML file and creating tables from XSJS using SQL. I have my XML file parsed at the XS layer. Now I would like to know how to use this file to create tables in HANA. Could you help me out here?

Thanks,

Subhashini

Former Member
0 Kudos

Hi Thomas Jung,

,

I'm Working on the Calculation view where I'm facing challenges in creating  a Calculated column.
I have a Column named countries which has all countries. The ultimate goal is "to create a visualization using Lumira server"
So using graphical Calculated view,I created a Calculated column  for the countries column and gave a semantic type to Geo Location- Normalized Name.

But I'm unable to see the Geo type representation in the lumira chart , which must allow me to perform Geo charts. Could you guide me how should I change the countries columns to Geo Location.

And also please guide me in calculation view  is it possible for me to apply a calculation a use case i.e. "if have dimensions more than 9 attributes.Then I need to show then top 9 and remaining aggregating to others". So can i perform this calculation. Please guide me.


Thanks and Regards,

Shashikiran

Former Member
0 Kudos

Hello Thomas,

I'm using XSDS extensively in my project. However, there is a huge performance issue with even small update/inserts to the data. From the blog and PPT I got to know that I should do all the imports of the entities in an xsjslib file, rather than each xsjs file to improve performance. I created a library with all the 8-9 entities that I need for the entire project. Not all these entities are used in all the xsjs files. Should I create a separate xsjslib file for each entity? I read in the blog that we can serialize the imports, can you please tell me how it's done?

Thanks

Former Member
0 Kudos

Hi Thomas,

While using complex OData associations (Association between two tables over a middle table) I keep getting this error:

{

    "error":

{

    "code": "",

    "message":

{

    "lang": "en-US",

    "value": "Service exception: [258] insufficient privilege"

},

"innererror":

        {

            "exception": "exception  1: no.71000258  (ptime/query/checker/query_check.cc:3290)\n    Not authorized\nNO exception throw location recorded. Stack generation suppressed.\n"

        }

    }

}

Can you please help me with that

Thanks

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

You might use the XS engine and parse XML in JavaScript.

On base SQL level, there is no built-in XML parser in SAP HANA SPS 9 (or before).

- Lars