Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: XML input step - how to obtain a partial xml input?

  1. #1
    Join Date
    Feb 2011

    Question XML input step - how to obtain a partial xml input?

    I am trying to use the XML input step to partially parse out the XML file:
    Example file:
    <account number="1">
    <topic>so long</topic>
    <account number="2">

    What I'm trying to accomplish is that I read and parse into fields account number and salutation, but everything deeper (actions, activities etc) I want to pass "AS IS" as a string field to be written to a dbase column.
    So the table layout is:

    The problem I have is that the XML input step - when it hits the level of "XML_STUFF" strips out all the XML tags and only passes the values as text and empty spaces in-between.
    In another instance I was able to bypass this issue by formatting the source XML with CDATA wrapper, but in this instance - the XML comes to me in certain format that I have no control over.

    How can I accomplish my goal with kettle?? Can I ??

    HELP please !

  2. #2
    Join Date
    Nov 2008


    Sure you can do it in kettle. For the "everything deeper" xml_stuff field, select a "Result type" of "Single node" instead of "Value of". That should preserve all the tags.
    Java 1.7 (64 bit)
    MySQL 5.6 (64 bit)
    Windows 7 (64 bit)

  3. #3
    Join Date
    Feb 2011


    Wow - didn't even consider that! Works like a charm ! Thanks!!!!

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