3 Columns in 2 datatables, compare then store in new datatable

I have got 2 huge csv files (input dt). I want to compare 3 columns as below:

I have 3 x separate queries in the Assign activity for reference.

How do I combine these into one assign activity? I have tried using AND but must be doing something wrong


In_DataTableFin.AsEnumerable().Where(Function(row) Not In_DataTableCol.AsEnumerable().Select(Function(r) r.Field(Of String)(In_DTCol_DataDate_To_Match.ToString)).Any(Function(x) x = row.Field(Of String)(In_DTFin_EffDate_To_Match.ToString))).CopyToDataTable()

In_DataTableFin.AsEnumerable().Where(Function(row) Not In_DataTableCol.AsEnumerable().Select(Function(r) r.Field(Of String)(In_DTFin_CCKey_To_Match.ToString)).Any(Function(x) x = row.Field(Of String)(In_DTCol_CCKey_To_Match.ToString))).CopyToDataTable()

In_DataTableFin.AsEnumerable().Where(Function(row) Not In_DataTableCol.AsEnumerable().Select(Function(r) r.Field(Of String)(In_DTFin_Amount_To_Match.ToString)).Any(Function(x) x = row.Field(Of String)(In_DTCol_ExpAmount_To_Match.ToString))).CopyToDataTable()

Then, in the output datatable I want the comparison columns from both source files to show with an additional Status column at the end with a “Match” or “Unmatched” value.

Hi @Nyx

Do you want to update the match and unmatch status in other column right. If yes, then we can use linq expressions.

If possible share the input files and required output file which helps for our better understanding.

Input.7z (2.9 MB)

The output file should be as follows:

exceptions-example.7z (59 Bytes)

I am not able to open the files, could you share the files which are in excel format… @Nyx

Hi mkankatala,

Here you go

Collections_Delta.xlsx (32.8 KB)
FinancialsDelta.xlsx (2.0 MB)
exceptions-example.xlsx (11.2 KB)