The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Filter out Data for Scenario A=B,B=A then pick only one like A=B

sgnarkhede2016sgnarkhede2016 Member Posts: 152 Contributor II
Hello,
I have Configuration File that contains combination Like
Att1            Att2
Customer beneficiary
beneficiary Customer
currency    Customer
Customer  Currency
receiver        Sender

Scenario Like  A=B,B=A then pick only one like A=B

Expected output
Att1            Att2
Customer beneficiary
Customer  Currency
receiver        Sender

Thanks In Advance

Best Answer

  • kaymankayman Member Posts: 662 Unicorn
    Solution Accepted
    This would require a lot of steps so not too sure if this is the best way to work on larger files.

    The idea would be to first generate an ordered list and then remove all the duplicates, so you get only the unique combinations left.
    Meaning if we have Customer Beneficiary the system would order them alphabetically so they become Beneficiary Customer instead. Once grouped only the unique ordered combinations remain.

    Now, since you are mixing upper case and lower case (currency and Currency) you probably want to convert all to lower case also as these are not the same for a machine (lower cases will be sorted before upper case, or the other way around...)

    Attached draft may get you started 

Sign In or Register to comment.