xmlxml-parsingmappingworkflowinformatica-powercenter

INFORMATICA POWERCENTER: Mapping issue and XML output


I'm a beginner with Powercenter, and I want to convert a relation output result into a xml file. I have a xsd file with the xml structure. When I import it into Designer, PWC create automatically the target, but when I validate the mapping, I received this error:

         The XML view [X_Data] is projected but it is not reachable from a root view.

XML Definition is correct and it's valid XML_Definition

Here the mapping

I found this solution but I don't know what to do Solution

Please can you explain me where is the issue ? Thank you for support

UPDATE: I think I've found the solution. In the mapping, I've add 2 sequence generator and link them to element root of xml, XPK_Statistics (and FK_Statistics) and XPK_Records (FK_records). I link CURRVAL field and not NEXTVAL because during previous executions, the record data wasn't populated correctly (they were being read from the database, but not write into xml).

This is my mapping now: mapping update

With this solution, I can add more source table and obtain only ONE xml like this: xml_complete

Here the complete xsd (maybe it's useful for someone): xsd


Solution

  • You need to fill in the PKs and FKs. Country and ID are part of Data, that is a part of Records structure. It's a one-to-many relationship. And with no PK/FK given, PowerCenter is not able to tell to which parent the child structure belongs to.

    Think of it this way perhaps: assume there will be 3 input rows, each having a pair of Country and ID columns. Should they go to three separate Records or all be a part of the same one? Perhaps first and second pair should go to one Records structure, and third pair to another instance of it? How to tell?