I need to export a large amount of data (from TERADATA by an sql query) to a csv file using PowerShell. The process is working but is very very slow. I am using this code for exporting :
($DataSet.Tables[0] | ConvertTo-Csv -delimiter "|" -NoTypeInformation ) -replace '"', "" | Out-File $extractFile -Force
$extractFile is the path where I want to put my csv file.
Do you have any idea why is it that slow and how i can deal with that ?