Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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"
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.
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.
Hi,
I have finally used the wizard to create the metadata.
Taking my example file, I have created a new input xml
Then I select only the fields from QualificationInformationChangeEvent.
then, in a new job, I dragdropped the metadata as tInputXMLFile, and connected it to a tLogRow.
and it found all the records (2).
Rahll, thanks for your support. I will open now another ticket with my next issue...