Error while using merge Data table activity

Hi All,

I keep getting this error when I try to use merge activity on data table -


The message is pretty clear. The columns in the datatables aren’t the same.

  • MissingSchemaAction - Specifies the action to take if there are schema issues when merging the two DataTables.


In the above pic, I checked dt1_1, dt2_1 and dt3_1 and all of them has this column name. If that’s what you meant.

Hey @shekhawat.arjun1307,

What about your destination DT? Did you use build data table and add the columns to build that? Or is it just an empty DT to merge into?

1 Like


I hope you have these while merging datatable

  1. Same order of columns
  2. Same number of columns
  3. Same type of column

Though you have these with dt_1, dt_2, …
Ensure that you have the same in destination datatable where you are going to merge them all together

Cheers @shekhawat.arjun1307

I am using an assign activity to create a data table from one of the 3 Data tables iI have like below:
Dtdata = dt1_1.Clone

Surprisingly, when I use the write range actvity to write down Dtdata it is empty.

I think I have all the 2 conditions as dt1_1, dt2_1 and dt3_1 are all from the same excel sheet(I created 3 copies of the same excel sheet) and also the destination is also a clone of dt1_1, but when I use write range on the clone data table it is empty.

If your main intention is to merge all these data and write in a excel then directly use a append range activity

Cheers @shekhawat.arjun1307

the main intention is to create a new excel file which will contain all the info from 2 specific columns from these 3 files

If you toggle a breakpoint on the assign that clones the DT, do you see the DT get cloned properly? Or does that not appear to be happening?

Which means like you want only that two columns alone from merged datatable

In that case first we can get the column Alok e we want from each table
Using a assign activity like this

dt1_1 = dt1_1.DefaultView.ToTable(False,”columnname_1”,”columnname_2”)

And send them to append range

Clone isn’t supposed to copy the data. It only copies the structure

I am not pretty sure what you meant here, but I did give a toggle breakpoint on the clone activity and it the workflow works fine.

My apologies. If you toggle the breakpoint and then watch your destination DT in the watch panel for that assign activity you should see the DT go from null to the same headers added to it from the source dt.



tried there seems to be an issue
the excel sheet looks something like below
And what is happening is that it only pics the first occurrence higlighted in green and in the merged excel it is just printing the records as below
XYZ 10
ABC 10
XYZ 30
whereas this should be repeated 3 times as the other 2 files also had the exact same data

I checked the cloned DT value is null

That’s a source data issue. Read Range is doing what it’s supposed to do.

When I see things like this while building an automation, I see if the source data format can be improved. Otherwise you’re going to have to build logic to fill in the blank cells in the datatable after you do the Read Range.

Yeah but atleast it should be repeated 3 times because we are using merge operation on 3 tables

Merge Datatable is more accurately thought of as concatenate datatables. If you have 5 rows in dtA and 10 rows in dtB, after merging you will have 15 rows.

Can you help me with this problem to fill in the blank cells in the source data