Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
spr654
Creator
Creator

tInputFileXML returns null values in Open Studio 7.1

Hi,

 

Using an xml that I have entered as metadata (I don't know why, but xsd files are not working 100% with the mapping), I have imported it as tInputFileXML in a job. This file is in attachment. This is the structure in the metadata:

 

0683p000009M3D6.png

In the file I have 2 transactions, and in each transactions I have  2 changeEvents. 2 of the events are of type QualificationInformationChangeEvent; and 2 are customsqualificationValidityChangeEvent.

The issue: when I try to get the 4 records, I get nulls everywhere. This is the loop XPath query that I use:

"/ns0:replicationMessage/body/transaction/changeEvent"

0683p000009M04S.png

 

and the results:

|messageId|sender|recoveryMode|sentOnTime|transactionId|changeType|changeTime|versionId|source|typeOfQualification...
|=--------+------+------------+----------+-------------+----------+----------+---------+------+-------------------+
|null |null |null |null |null |null |null |null |null |null
|null |null |null |null |null |null |null |null |null |null
|null |null |null |null |null |null |null |null |null |null
|null |null |null |null |null |null |null |null |null |null

 

What went wrong? Any help is welcome.

 

 

Labels (3)
11 Replies
Anonymous
Not applicable

Sorry, I didn't see the example XML you posted originally.

 

Your new layout makes sense having seen that. You need to loop on the element that is the key to your row data. My assumption previously was that you had the loop element correct since you were getting the correct number of rows, albeit with nulls. This would normally be a symptom of a namespace issue from my experience. I may have jumped to that conclusion, so I apologise for sending you down the wrong track.

 

I know populating the XPaths like this will be time consuming, but there is no easier way of doing this. I've had to interrogate XML files with multiple nested loops which have required multiple components and hundreds of XPaths, so know it is not fun. 

spr654
Creator
Creator
Author

Hi,

 

I have finally used the wizard to create the metadata.

 

Taking my example file, I have created a new input xml

 

0683p000009M3IB.png

Then I select only the fields from QualificationInformationChangeEvent.

0683p000009M2B6.png

 

then, in a new job, I dragdropped the metadata as tInputXMLFile, and connected it to a tLogRow.

0683p000009M3IL.png

 

and it found all the records (2). 

Rahll, thanks for your support. I will open now another ticket with my next issue...