Skip to Content
author's profile photo Former Member
Former Member

Information Steward : Compare 2 flat files

Hello,

We have a requirement of comparing 2 flat files in Information Steward.

We are seeking answers for the below questions :

1) Is it possible to compare 2 flat files in Information Steward ?

(we are aware that it is possible to compare a file with a table using 'exists' function)

2) It is required to find which records exist or do-not exist in a particular file vis-a-vis the second file

3) for the records which exist in both the files (matching reocrds) , it is also required to compare the values of the records to find if the value of these records same ?

Any thoughts or inputs would be highly appreciated.

Regards,

Krupali

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jul 19, 2016 at 07:54 AM

    Hi Krupali,

    given the estimation that your two files contain records you want to compare are both having an ID column (e.g. BuPaID or MaterialID) where the content of the record should be identical for same IDs, I think you can achieve following in SAP Information Steward:

    1) Add the files to you project and do a Redundancy Profiling with the two files and comparing the ID column. This will create a Venn diagram showing you, how many IDs are in both files, who many are in FileA but not in FileB and how many are in FileB but not in FileA.

    --> This provides first insight, not matching the content of the record itself, but if you want to you can increase the number of fields (ID + ProductName, ...)

    2) If you want to apply rules to your data and even bring scores to a DQ Scorecard on consistency across data sources, then Devilal's approach is a way to go: Create Information Steward view(s). One View if you focus just on on File, two views if you want to understand both directions A--B and B--A.

    https://scn.sap.com/docs/DOC-33471

    Add to the Information Steward View all the fields that you want to use for comparison (e.g. ProductNameFromFileA, ProductNameFromFileB, ProductColorFromFileA, ProductColorFromFileB, ...)

    Then define your Validation Rules that the Names, Colors should be identical and bind the rules to the View(s).

    Create the Rule Task and you will get scores showing how many times records with same ID have different field content.

    Best regards,

    Niels

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Niels,

      Thank you for the detailed explanation.

      Seems to perfectly match our requirement.

      We have just tested this fora demo and we will plan to put this solution to use once our analysis is completed.

      Thank you again ! :-)

  • Posted on Jul 18, 2016 at 02:33 PM

    This is a perfect use case for SAP Data Services. Would that be an option?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 18, 2016 at 06:53 PM

    Hi Former Member,

    One option (in SAP IS) will be to create a view with File1 left outer join File2 and create rules to compare columns.

    Thx,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.