Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AguWolkovicz
Partner - Contributor II
Partner - Contributor II

How performant is it to use from_field to parse an XML stored in a table's column in the database?

Hi all,

I'm working on a Script that may need to handle XML Data that's stored in a column in a database table.

I've used the from_field in a Load statement in the past, but it was just for a configuration table, with very few rows.

But, in this new requirement, I'm sure the case won't be the same, with regards to the data volume that the Script has to handle.

So, my question is in that direction:

- Does the data volume really impact the performance of the from_field statement?

- Did anybody use this for a large dataset? How did that go?

- Are there any recommendations about how to load data from XML structures (or any other type) within a database table?

Here's an extract of the Script I had in my first experience:

---------------------------------------------------------------------------------------------------------------------------

ConfigurationTable:

Load id,

        xml as ConfigurationField;

SQL

SELECT *

from configuration_table;

ConfigurationData:

LOAD

DISTINCT

id,

ConfigurationField

Resident ConfigurationField;

Drop Table ConfigurationTable;

ConfigurationXML:

LOAD

DISTINCT

id,

[configuration/some-xml-field] as SomeXmlFieldValue

from_field (ConfigurationData,ConfigurationField)

(XmlSimple, Table is [Configurations]);

Drop Table ConfigurationData;

Store ConfigurationXMLinto 'lib://Configurations/configuration_table.qvd'(qvd);

Drop Table ConfigurationXML;

---------------------------------------------------------------------------------------------------------------------------


Thanks in advance!

Agu.-

2 Replies
glencote
Contributor II
Contributor II

Hi Agustin,

Did you ever manage to figure this out?

Richard

AguWolkovicz
Partner - Contributor II
Partner - Contributor II
Author

Not for the time being since it was decided to save the data in a different manner in the database.

But, have you tried this with a large data set? Say, 100k+ rows.

Thanks in advance!

Sorry for the late answer!

Kind regards,

Agu.-