Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Any thoughts on how to load an XML file of the structure:
<?xml version='1.0' encoding='utf-8'?>
<table title='Project Entities'>
<columns>
<column name='_humanised_name' title='Name' description='The name of the entity' width=''/>
<column name='ENTITY_ID' title='Ref' description='Internal entity reference' width=''/>
</columns>
<rows>
<row>
<cell value='Customers'/>
<cell value='1'/>
</row>
<row>
<cell value='Orders'/>
<cell value='2'/>
</row>
</rows>
</table>
So that the table is represented in Qlikview as:
Entity, ID
Customers,1
Orders,2
When using the generated XmlSimple statement, synthetic keys and an incorrect data model are generated.
Thoughts!?
Many thanks,
Dan
H,
one possible solution might be:
tabEntity:
Generic
LOAD Ceil(RecNo()/2) as RowNo,
Pick(Mod(RecNo()-1,2)+1,'Entity','ID'),
value
FROM [QlikCommunity_Thread_137372.xml] (XmlSimple, Table is [table/rows/row/cell]);
hope this helps
regards
Marco
Thank you!!!
You're welcome.
Please mark this thread answered if there are no further questions.
Thanks
Regards
Marco