Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Sush678
Contributor II
Contributor II

XML Key fields values Null Issue while importing XML file in Qlikview

Hi ALL,

We have requirement where we need to read multiple XMLs files to Qlikview  from multiple Folders. Each XMLs has data from various area and which gets loaded as multiple table.

When we load the XMLs it directly creates tables based on the script in XML. Also, it creates its own autogenerated keys for joining those tables. Keys fields for some of the internal tables are fine but the main Key  which connects all table has key values as 0 on all the rows.

Any idea about the how the autogenerated Key gets generated while importing the XMLs to Qlik and how it can be handled to have a proper link within the table across the file. Any suggestion/guidance related this would be really helpful

Thanks in advance

Labels (1)
  • Other

2 Replies
MarcoWedel

you could create unique key values out of the file path information and those autogenerated keys, e.g. like

tabSomeTable:
LOAD SomeFields,
     AutoNumber(Hash128(%Key_ABCD0123456789,FilePath()),'%Key_ABCD0123456789') as %Key_ABCD0123456789
FROM [$(vFile)] (XmlSimple, Table is [SomeTable]);

or

AutoNumberHash128(%Key_ABCD0123456789,FilePath(),'%Key_ABCD0123456789') as %Key_ABCD0123456789

 

 

 

Sush678
Contributor II
Contributor II
Author

Hello,

First of all Thanks for the suggestion.

The Autonumber function work fine with multiple Files but I am facing issue while handling the multiple table from within the same XML file as the above function gives me value as '1 ' only. The output of all the tables within same XML is giving the Cartesian product  of records.

Any idea/suggestion to handle that  or if something can be fixed at the XML Source end.

 

Thank you!