views:

362

answers:

1

I am not sure if the "Derived Column" transformation is my solution, but here is my issue. I am importing a CSV file and one of the column has data sorrunded by "'" e.g '2009-01-01' instead of 2009-01-01. Can I use the "Derive Column Transformation" to remove the single quotes? What would the expression be?

Solution ~ Used the following expression in the "Derived Column Transformation"

REPLACE(['columnName'],"'","")
+1  A: 

Just an aside, I often get files that have single (') or double quotes ("") around the fields in CSV/XLS files to import into the SSAS cubes we have at my place of employment. When I created the ETLs I found that stripping both these possiblities out from files with 5000 plus rows using "Derived Column" components sucked so I simply created a small C# application that did it for me and it can work for any file, regardless of the data. As a result we use the same application for multiple daily ETLs and it works great.

Like I said, just a side note.

ajdams