Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Load from XML - duplicate data deleted

Hi,

I have an xml that contains employee id and more than one relationship viz. MGR_ONE, MGR_TWO etc.
Since there is only one employeeid, the load deletes one of the records and shows ONLY one relationship for each employeeid.

Is it possible to load all the records corresponding to each employeeid.

I have attached the qvd..

XML:

<hello message="hello-HELLOSet" version="2.0">
<HELLOSet>
<HELLO>
<HELLOIdentifier>
<EmpID>133104</EmpID>
<EmpName>Tarzan 1</EmpName>
<HELLOIdScheme>EmpID</HELLOIdScheme>
</HELLOIdentifier>
<relation><HELLOIdentifier><EmpID>12345</EmpID>
<HELLOIdScheme>EmpID</HELLOIdScheme>
</HELLOIdentifier>
<relationScheme>MGR_ONE</relationScheme>
<firstName>FST 133104</firstName><lastName>LST</lastName>
</relation><relation>
<HELLOIdentifier><EmpID>98765</EmpID>
<HELLOIdScheme>EmpID</HELLOIdScheme></HELLOIdentifier>
<relationScheme>MGR_TWO</relationScheme>
<firstName>SEC 133104</firstName><lastName>LST</lastName></relation>
</HELLO>
</HELLOSet>
<HELLOSet>
<HELLO>
<HELLOIdentifier>
<EmpID>133444</EmpID>
<EmpName>Tarzan 2</EmpName>
<HELLOIdScheme>EmpID</HELLOIdScheme>
</HELLOIdentifier>
<relation><HELLOIdentifier><EmpID>12555</EmpID>
<HELLOIdScheme>EmpID</HELLOIdScheme>
</HELLOIdentifier>
<relationScheme>MGR_THREE</relationScheme>
<firstName>FST 133444</firstName><lastName>LST</lastName>
</relation><relation>
<HELLOIdentifier><EmpID>98777</EmpID>
<HELLOIdScheme>EmpID</HELLOIdScheme></HELLOIdentifier>
<relationScheme>MGR_ONE</relationScheme>
<firstName>SEC 133444</firstName><lastName>LST</lastName></relation>
</HELLO>
</HELLOSet>
</hello>

qlikview script:

Directory;
// Start of [eg.xml] LOAD statements
hello1:
LOAD
[HELLOIdentifier/EmpID] as [EmpID],
[HELLOIdentifier/EmpName] as [Emp Name],
[HELLOIdentifier/HELLOIdScheme] as [Scheme],
[relation/relationScheme] as Relation,
[relation/firstName] as Firstname,
[relation/lastName] as LastName,
[relation/HELLOIdentifier/EmpID] as MgrID
FROM ..\eg.xml (XmlSimple, Table is [hello/HELLOSet/HELLO]);

STORE hello1 into abc.qvd

Community Browser