Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Denormalizer Attribute

  1. #1
    Join Date
    Jun 2015
    Posts
    4

    Default Denormalizer Attribute

    I'm trying to run a denormalizer step to get a CSV file from XML. I have the Key Value set to XML_Path and everything works well except for 1 attribute for 1 node:

    <Amt Ccy="NOK">0.00</Amt>

    "Ccy" exists on a few nodes that I don't care about. Overall I need to output "NOK" and "0.00". Attached are a few screen shots from the step:

    Name:  Denormalizer Lookup.jpg
Views: 30
Size:  5.8 KBName:  Denormalizer View.jpg
Views: 28
Size:  5.6 KB

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    If you don't work with XML input and Kettle on a regular basis, there's a chance you are doing it way too complicated.
    Can you attach a sample XML document?
    We can show you how to successfully extract whatever you want, then.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Jun 2015
    Posts
    4

    Default

    Thanks Marabu,

    Sample attached.

    The output values I want are:
    /Root/Document/PricRpt/PricValtnDtls/NAVDtTm/DtTm
    /Root/Document/PricRpt/PricValtnDtls/FinInstrmDtls/Id/ISIN
    /Root/Document/PricRpt/PricValtnDtls/PricDtls/Tp
    /Root/Document/PricRpt/PricValtnDtls/PricDtls/ValInInvstmtCcy/Amt
    /Root/Document/PricRpt/PricValtnDtls/PricDtls/TaxLbltyDtls/Amt

    And then the Ccy attribute values from (<Amt Ccy="ABC">from:
    /Root/Document/PricRpt/PricValtnDtls/PricDtls/TaxLbltyDtls/Amt
    /Root/Document/PricRpt/PricValtnDtls/PricDtls/ValInInvstmtCcy/Amt

    XMLInput.txt

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I left some fields for you to add.
    Come back if your XML document is too heavy for a DOM parser.
    Attached Files Attached Files
    So long, and thanks for all the fish.

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.