Hi, I’ve apply Full Join to two regular datatables, but final datatable are split into two rows.
I.e. datatable 1
DT1 column 1
DT1 column 2
DT1 column 3
DT1 column 4
xxx
yyy
zzz
qqq
xx
yy
zz
qq
x
y
z
Datatable 2
DT2 column 1
DT2 column 2
mmm
yyy
mm
yyyy
Join datatable (after full join should be )
DT1 column 1
DT1 column 2
DT1 column 3
DT1 column 4
DT2 column 1
DT2 column 2
xxx
yyy
zzz
qqq
mmm
yyy
but I have
DT1 column 1
DT1 column 2
DT1 column 3
DT1 column 4
DT2 column 1
DT2 column 2
xxx
yyy
zzz
qqq
mmm
yyy
Do you know where is the problem? Or how should I fix the final datatable?
1 Like
Hey!
Use merge data table activity
Regards,
NaNi
I Apply merge to the final join table and still the same result
Hey!
Cool we can do it in another way
Create one Temp Dt- TempDt - create the desired columns - DT1 column 1 DT1 column 2 DT1 column 3 DT1 column 4 DT2 column 1 DT2 column 2
Read first Dt - DtOut1
Read second Dt - Dtout2
Take one for each row and pass the DtOut1 - CurrentRow1
Take one more for each row and pass the DtOut2 - CurrentRow2
Now take the add data row - pass the Dt as TempDt
pass the expression in ArrayOfRows. like this
{CurrentRow1(0).ToString,CurrentRow1(1).ToString,CurrentRow1(2).ToString,CurrentRow1(3).ToString,CurrentRow1(4).ToString,CurrentRow2(0).ToString,CurrentRow2(1).ToString}
After for each row
Take one write range and pass the TempDt as DataTable
This will work for sure
Regards,
NaNi
Yoichi
(Yoichi)
July 27, 2022, 7:41am
5
HI,
Another approach:
How about the following step?
Write dt1 to “A1” in some sheet of some workbook using WriteRange Activity(with header)
Write dt2 to “E1” using WriteRange Activity(with header)
Read datatable from “A1” using ReadRange activity(with header)
Regards,
The tables are particularly fine, but they split into two rows only after the join.
But I need to apply Join to these datatables, Will that be still possible?
1 Like
shankm
(Shan KM)
July 27, 2022, 8:33am
11
Hi @Katerina_Chabova ,
I tried the same data tables and INNER join is producing the required output.
Have you tried inner join?
ppr
(Peter Preuss)
July 27, 2022, 9:00am
12
as mentioned above the described output is of type:
inner join
left dt: dt1
rigth dt: dt2
Join cols dt1.column2 to dt2.column2
Operation: = (equals)
For the different Join Type have a look here:
Dear innovator’s,
All we know that there is a Join Data table activity in UiPath.If we get any matching scenarios with unique value will approach join data table activity instead of filter/loop/array matching activity to find an exact match.
Join Data Table:
[image]
Combines rows from two tables by using values common to each other, according to a Join rule, which is specified in the Join Type property.
Sample Table:
[image]
INNER Join:
The INNER JOIN keyword selects records that have m…
csathys
(Dairy Land)
July 28, 2022, 1:37pm
15
Per Documentation, a Full join will keep all rows from DataTable1 and DataTable2 , regardless of whether the join condition is met. Null values are added into the rows from both tables that don’t have a match. Pretty much like a cartesian product.
Use Inner join, which is what appears to be the requirement in your case. Only rows that meet the join condition from both data tables will be returned.
UiPath.Core.Activities.JoinDataTables Combines rows from two tables by using values common to each other, according to a Join rule, which is specified in the JoinType property. Properties Common DisplayName - The display name of the activity. Input...