Showing posts with label csv. Show all posts
Showing posts with label csv. Show all posts

Wednesday, March 28, 2012

Pad Spaces in FFConnection properties?

This is a considerably LOW priority, but is there a way to padd spaces in ssis flat file connection properties? We have cases where a CSV file will read in and throw a truncation error because the field length is greater then defined. However, the CSV file might look like ,"ABC ", where a number of trailing spaces are found. Is there some way to handle this without having to adjust teh field length, maybe ignore whitespace at the source?There is no way at the Flat File Source to ignore trailing whitespace, however there is a work around. Say in this case your field length is 3, and if there are trailing spaces after that, you want to ignore them. You can then use "Ignore Failure" for Truncation Error Disposition. That is, in the Error Output tab for the Flat File Source, for Truncation of this column, choose "Ignore Failure", instead of "Fail Component". By doing this, it will only get the specified characters, and ignore the rest, whether they are trailing white spaces, or some other data there. You have to make sure that this is not causing you to accept some data which you otherwise wanted to fail on really.|||

That is partially the problem, we only want to ignore whitespaces, but if there is actual chars then we would want to throw truncation error.

Thanks for your thoughts...

Monday, March 12, 2012

Package Configuration Error

Not sure if you guys have run across this error. I created a simple SSIS package to import from a csv file into SQL Server, and I made it configurable so I can point to any of my 4 destination SQL Servers.

In the error list pane, i'm getting this warning:

Warning loading Package.dtsx: Table "[dbo].[SSIS Configurations]" does not have any records for configuration. This occurs when configuring from a SQL Server table that has no records for the configuration.

The funny thing is, the table is populated with 2 properties, Catalog & ServerName, but at run time, its like the Package ignores the SQL table to apply configuration properties.

Any help would be greatly appreciated.

-- J

Might it be looking at a table in another database than what you are expecting?|||What Phil said. Every time I've encountered this before, it's been because the connect string that pointed to the database with the configuration table wasn't correct.