ETL

Removing quotes from CSV created by PowerShell

In a previous post, I demonstrate how to reshape a comma delimited file (CSV) using PowerShell. I noted that the results put all of the column values in double quotes: “ID”,”Name”,”State” “5”,”Stephanie”,”Arizona” “4”,”Melanie”,”Oregon” “2”,”Katie”,”Texas” I used this code to produce this result: cd c:\MyFolder Import-Csv -Path SampleData.csv|Where {$_.Country -eq “USA”} ` | SELECT ID, Name, …

Removing quotes from CSV created by PowerShell Read More »

Using PowerShell to shape comma delimited file

PowerShell has power to handle many ETL tasks (PowerShell as an ETL tool). In this post I illustrate how you can use PowerShell to shape a comma delimited file. That is, how to remove columns, filter rows and sort the file output. Let’s start with a simple file (SampleData.csv): ID,Name,State,Country 1,Russ,Sandys,Bermuda 2,Katie,Texas,USA 3,Gail,Sandys,Bermuda 4,Melanie,Oregon,USA 5,Stephanie,Arizona,USA …

Using PowerShell to shape comma delimited file Read More »