5 Replies Latest reply on Feb 14, 2021 3:31 AM by user165569

    DEI - XML Tutorial

    hayes5736 New Member

      Does a tutorial exist that shows how to create a mapping with an XML source for which I also have an xsd file for the schema? I remember doing this in PowerCenter a long time ago but nothing in the Developer tool looks familiar to me.

        • 1. Re: DEI - XML Tutorial
          hayes5736 New Member

          I also want to add that I've been reading through the documentation about the Data Processor transformation. It seems that I should be using the Data Processor transformation but I just can't figure it out.

          • 2. Re: DEI - XML Tutorial
            Krishnan Sreekandath Seasoned Veteran

            Hello Hayes,

             

            I have not been able to find a tutorial but you should be able to create a Complex File Data Object and select the subtype as XML.

             

            Once the PDO is created you can navigate to Data Object Operations -> Read and Write types -> Schema -> Enable Column Projection, select XML as the Schema Format and then provide the XSD for the XML used to import that data object.

             

            This should help you create XML PDOs in the repository and based on whether it is used as a source or target the Read or Write Data Object Operation properties will be applied.

             

            Thanks,

            Krishnan

            1 of 1 people found this helpful
            • 3. Re: DEI - XML Tutorial
              Prithvi Chaturvedi New Member

              Hi Hayes,

               

              Please refer below article:

               

              Support

               

              Support

              • 4. Re: DEI - XML Tutorial
                hayes5736 New Member

                I did as you suggested and was able to create the XML source. I'm only interested in the read operation at this point. The read operation gives me an output with 4 fields. The file name (string), header (struct), item (array), footer (struct).

                 

                The item field contains the hierarchical data that I'm interested in. Inside the item array there are other struct and array fields containing more structs and arrays. How do I get the deeply nested ports from the source to something like an expression. I can move all ports to an expression but if I try an individual port that is nested I see a message, "Can not start a connector in an element of a complex port.

                 

                My targets will be relational targets using keys to link data from the various levels of nesting.

                 

                What's the next step in trying to flatten the hierarchical data?

                • 5. Re: DEI - XML Tutorial
                  user165569 Guru

                  HI William,

                   

                  We have an option in Developer tool to Flatten the Complex port to process these nested ports. Please refer below doc reference for more details:

                   

                  Flatten Hierarchical Data

                   

                  Hope this helps.

                   

                  Thanks,
                  Ninju

                  1 of 1 people found this helpful