SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Removing noisi commas in CSV file (SSIS)


Removing noisi commas in CSV file (SSIS)

Author
Message
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63146 Visits: 13298
damien.gulluni (10/7/2013)
I fully agree when you have the control of the file produced .. The file comes from Business Object world and I have only choice between tab, semicolon, and comma which are all delimiter that can be used in the file I receive.

But for me the main problem is that the excel engine can handle that case while SSIS cannot.

Regards,
Damien


It's not SSIS' fault that your csv is malformed.
As I see it, the text qualifiers are not correctly handled. (as I see multiple text qualifiers in one column)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
damien.gulluni
damien.gulluni
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 16
Anyway this is not the concern of my request to say if SSIS is responsible or not ...

What I am looking for, and thank you again for your time, is to find a solution with all the constraint I have.
Actually the process is fully manual and I am trying to automate it with SSIS.

In order to open the file with excel in SSIS I am trying to use a script task. But now the issue I am facing is that I cannot find Excel Interop component to be used in vb.net script (SSIS 2005 version).

Regards,
Damien
Raunak Jhawar
Raunak Jhawar
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3763 Visits: 1944
Can you see all the columns in the file along with the header names?

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
damien.gulluni
damien.gulluni
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 16
Yes Raunak.

Damien
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63146 Visits: 13298
damien.gulluni (10/7/2013)
Anyway this is not the concern of my request to say if SSIS is responsible or not ...

What I am looking for, and thank you again for your time, is to find a solution with all the constraint I have.
Actually the process is fully manual and I am trying to automate it with SSIS.

In order to open the file with excel in SSIS I am trying to use a script task. But now the issue I am facing is that I cannot find Excel Interop component to be used in vb.net script (SSIS 2005 version).

Regards,
Damien


It's a .csv file, not an Excel file. You can use the StreamReader class to read the file.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
damien.gulluni
damien.gulluni
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 16
You can open csv in excel and I obviously know the difference between excel and csv files.

I don't think that using StreamReader class will help me a lot.
Raunak Jhawar
Raunak Jhawar
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3763 Visits: 1944
The first 1100+ rows are loaded with no errors. Can you please analyze the issue with the row(s) which are failing?

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
damien.gulluni
damien.gulluni
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 16
Hi,

I have solved my issue using the following:
- create a script task that will open my csv files with excel (yes you can do that Wink) and execute a macro that will replace all the noisy commas (only noisy for the SSIS csv engine) with space.
- open the csv files with the SSIS Flat File Source
- load the csv files in database using Ole DB Destination

Thanks again for your time,
Regards,
Damien
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search