Closed
Description
I have a C# component which is presently running in Azure Data lake and i am planning to move to Spark and reuse the same component.
My example scenario
C# takes an input of Manager Dataset like
mgrId | name |
---|---|
11 | ABC |
22 | DEF |
C# component returns a List of Reportee, where Reportee is Defined as
Class { public int EmpId; public string Name; public string Role; public int MgrId; }
Reportee dataset
empId | name | role | mgrId |
---|---|---|---|
100 | pqr | admin | 11 |
200 | stu | reader | 11 |
300 | wxy | reader | 22 |
intended UDF
var udf = Udf<int, List<Reportee>>((mgrId) => return component.Execute(mgrId); });
for each row in my Manager dataset, i have to call UDF to get final result in spark as
mgrId | mgrname | empname | empid | Role |
---|---|---|---|---|
11 | ABC | pqr | 100 | admin |
11 | ABC | stu | 200 | reader |
22 | DEF | wxy | 300 | reader |