Hello I Used below code to Merge CSV files using one common Key for adding one column from Child.CSV
to Parent.CSV
.
{
Import-Csv "D:\CSV check\Sourcecount.csv" -Header Sourcecount, MONTH_YEAR | ForEach-Object -Begin {
$Employees = @{}
} -Process {
$Employees.Add($_.MONTH_YEAR,$_.Sourcecount)
}
Import-Csv "D:\CSV check\RenameFinal.csv" | ForEach-Object {
$_ | Add-Member -MemberType NoteProperty -Name Sourcecount -Value $Employees."$($_.MONTH_YEAR)" -PassThru
} | Export-Csv -NoTypeInformation "D:\CSV check\sourcefinal.csv"
}
Question: Can you please help for the scenario joining for getting one column value from child.csv to Parent.csv for two common keys (by data and by userid).