Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: how to compare xml file input with sql input

  1. #1

    Default how to compare xml file input with sql input

    Hello All

    I want to compare xml file input with table input(sql table data).

    Is it possible to compare this two? if yes, which component should I use .

    Regards
    Sandhya

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    In order to compare data, you need to import it into a transformation.
    XML input step, table input step and then compare the 2 streams.
    You can use a stream lookup and then a calculator step or a modified java script step.
    It depends what you want to compare.

    Mick

  3. #3

    Default

    You could also use the two input steps(xml input + table input) use a 'select values' step after each to get the data into the same format, sort the data, then put it into a Merge Rows(diff) step. This will add a flag field which will say if the rows are identical, new, changed, deleted.

    So you'd have
    XML Input -> select values -> Sort Rows -> Merge Rows(diff)

    Table Input(Sorted the same as above) -> Select values -> Merge Rows(diff) <- this is the step from above.

    Tip on the Merge Rows(diff) step:
    The 'reference rows origin' is the existing rows, and the compare rows origin are the new rows.

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.