No announcement yet.

Compare Data Files - Save Differences In Same Format

  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare Data Files - Save Differences In Same Format

    I must be missing something as this sounds like a very simple request and I couldn't find an answer in the forums etc.

    Lets say I have "products" csv that gets updated with new products, price changes etc. This file is generated on a daily basis from a db and I simply wanted to compare yesterdays version of the file with todays, with the resulting differences output to a file in the exact format for further processing (i.e. a one way, left to right or right to left comparison).

    I know I can output a differences file/report, but the formats of those report files don't maintain the original files format (e.g. side-by-side, interleaved, patch etc) - how can I simply dump out a "differences file" - nothing fancy, just the rows that have changed from the previous version of the csv...

    Any ideas?

    One last request along the lines of the above, is there an option to dump out a differences report as I listed above but with a simple character key "difference column" added to the output file outling the difference (i.e. "A" = Row Added, "C" = Row Changed, "D" = Row Deleted)?

    Thanks, TJ

  • #2
    There are a couple ways to approach this since the two data report types do not seem to meet your needs:

    - in the Data Compare, use Display Filters to Show Differences, highlight, and copy them. Paste them into a file of your choice.

    -Install the additional Text Compare rules that allow for Excel or CSV comparison in the Text Compare here (the topmost file format in the Tools menu -> File Formats is the one used automatically):
    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.

    The left side is the Source file, an the right side is the Changed file. Generate one of the Text Report types to get different report options.
    It sounds like you are looking for something closer to the Statistics Report in the Text Editor. The Summary Report may also be what you are looking for.
    Aaron P Scooter Software


    • #3
      The first option you list is the result I want, but I need to be able to do this programatically i.e. via script, but there doesn't appear to be a way to do it...

      As for the second option, I 'm not following how new file formats will help as I have no problem using the data compare or text comparisons to get what I want, it's just dumping it to a file thats the issue - it's the format of the differences report that doesn't help me...

      Ideally there should be an option to dump just the differences to a file in the same format as the source files (or even better, keep the format and add a leading column with a value similar to the "linecomp status" in the differences XML output report format - of course when generating this fictional report you would have to choose what side the differences related to for it to make sense)



      • #4
        If you use the Text Compare, with Text Unified Patch with context set to 0 should provide you with the raw data of our files. The Context Patch may also be useful depending on how you want to organize your data.

        If this is not what you are looking for, would you be able to send us some sample files, screenshots, and more detailed description of what you are looking for to [email protected] ? Please include a link back to this forum post as well.
        Aaron P Scooter Software