I have two databases with 42 column names and need merge to another database with the same 42 columns but with different name. How do that without chanches the name to 42 column?
DT1
Column0 | Column1 | column3 | column… | column42
1234 example 345 final1
1234 example 567 final3
1234 example 789 final5
12345 example 7890 final9
12345 example 890 final10
DT2
ColumnA | ColumnB | columnC | column… | columnAP
4567 example 345 final1
4567 example 567 final3
4567 example 789 final5
45678 example 7890 final9
45678 example 890 final10
DT Result
Column0 | Column1 | column3 | column… | column42
1234 example 345 final1
1234 example 567 final3
1234 example 789 final5
12345 example 7890 final9
12345 example 890 final10
4567 example 345 final1
4567 example 567 final3
4567 example 789 final5
45678 example 7890 final9
45678 example 890 final10
Thank @Gokul001 but its solution is similar to use Join, If I do that generate 84 columns. Only need 42 columns that are the same that de other database only with different name.
Thanks @ppr, however, databases have 800000 rows each one, but yeas both datatables are of same structure with different col names and same amount columns
This is most likely caused by an excel configuration of your R1C1 setting on one or the other. If you wish to standardize the column headings on both you will need to ensure these settings match…Excel/File tab/Options/ExcelOptions/Formulas/ then make sure the R1C1 check box is either checked on both data sources or unchecked on both. This should then standardize your column headings and you can use the file merge
@ppr thanks! this script LINQ works with small tables, when I implement with real data not work. I have DT1 with 200000 rows and dt2 with 800000 rows
I supouse that i need to change the 42 column names.
@Chris_Bolin thanks for you support but the datatable are without R1C1 I divide database Excel in diferent size datatable for i can to use read range and generate diferente datatable. The idea is after merge this datatables.
not work is NOT working for us. Just tell us in detail what is not working (exception, Performance (do not expect an execution time of 0 miliseconds or less), )
we just moving dt2. In prodction projects we handled rows within range of multiple Mio rows and it was performing in acceptable range (ok, its vage and relative, but we allowed executions <= 20 seconds)
you can check when removing the for only psychological reasons added CopyToDataTable
iCount =
(From d in dt2.AsEnumerable
Select r = dt1.Rows.Add(d.ItemArray)).Count
Then try this… read all of your inputs without headers. Then do an Output Datatable Activity with a string variable for each read. Then do a quick log message…information… and pass the string of your Output Dts. If I’m correct UiPath will default with Column1; Column2;…etc. one note… that size of data will cause latency in your automaton