Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: unable to maintain hierarchy in json output

  1. #1

    Default unable to maintain hierarchy in json output

    Hello!
    I am transforming xml to json in kettle. I have an xml file with parent child hierarchy and I want the same hierarchy to be maintained in the json output. I am using getDataFromXml and only the elements are getting populated in the field window. For eg, my structure is

    <department>
    <name>ADMINISTRATION</name>
    <id>1</id>
    <employee>
    <EmpID>7956</EmpID>
    </employee>
    </department>
    Here, name,id and EmpId are populated in json. The hierarchy Department-Employee isn't maintained in json output.
    How can I have the parent-child structure maintained in the output?

  2. #2
    Join Date
    Apr 2015
    Posts
    5

    Default

    Answering to previous question first:
    You can have two subsequent json plugins. In pdi-ce-6.1.0.1-196 there are few samples how to do that.
    Check pdi-ce-6.1.0.1-196/data-integration/samples/transformations/JSON - read nested fields.ktr
    Last edited by gutlez; 05-12-2016 at 07:35 PM. Reason: Please start new threads for new topics.

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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.