Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: XML generation

  1. #1
    Join Date
    Dec 2012
    Posts
    28

    Default XML generation

    Hi all,
    I am new to xml and need to produce an xml output from pentaho like below.


    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <crewDetails>
    <crewInfo crewId="45345345">
    <personalInfo>
    <searchName>sert tyur</searchName>
    <firstName>GTYH</firstName>
    </personalInfo>
    </crewInfo>
    </crewDetails>


    i used add ml and xml joints to produce the output.


    In the first xml join i get the output : <?xml version="1.0" encoding="UTF-8"?><crewDetails><crewInfo crewId="789456"/></crewDetails>
    XPath statement //crewDetails


    In the second xml join , i am getting error :XPath statement returned no result
    Xpath statement tried :
    1. XPath statement returned no result [//crewInfo[@crewId]]
    2. XPath statement returned no result [/crewDetails/crewInfo[@crewId]]


    I have no clue how to put complex join here.

    My pentaho transformation is like below.

    input xmladd (<crewDetails/>)
    input xmladd2(crewid) xmljoin
    input xmladd3(personalInfo) xmljoin2


    Anyhelp is appreciated.





    Thank You,
    Vini

  2. #2

    Default

    Maybe you should share your XML input files.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,636

    Default

    Have you read through the example "XML Join - Create a multilayer XML file" in your samples directory?

  4. #4
    Join Date
    Dec 2012
    Posts
    28

    Default

    I go through the sample xml.
    It helped me a lot. I managed to generate xml file.
    Thank you.

    I have a new problem now.

    My task is to generate xml file from the oracle database.
    But the xml element and path, i should take from corresponding XSD file.
    (I have table.column-element mapping table .)
    I managed to generate xml file from database, manually searching for the elements and the path from xsd file.
    But xsd file is undergoing minor changes.


    Is there any way to write xml file on comparing with XSD file?
    i found XSD Validator step. But is that just for validating the XML. ? I couldnt find any other step.


    Any help would be great .


    Thank You.
    Last edited by Plearner; 10-30-2018 at 07:29 AM. Reason: another doubt

  5. #5
    Join Date
    Apr 2008
    Posts
    4,636

    Default

    Generally, you establish a data contract (which gets codified into the XSD), and then you build the system that agrees with that data contract.
    If the data contract changes, all the costs associated with that change (updating the XSD, the source system, and the destination system) get estimated and approved before the change to the data contract is approved.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.