显示标签为“loading”的博文。显示所有博文
显示标签为“loading”的博文。显示所有博文

2012年3月22日星期四

Flat File loading issue

While loading the flat file into sql server2005 using SSIS , i am getting error like:

[Source - 20070801PensionPayments_dat [1]] Error: The "output column "Status" (246)" failed because truncation occurred, and the truncation
row disposition on "output column "Status" (246)" specifies failure on truncation. A truncation error occurred on the specified object of
the specified component.

In the EM import wizard, i can see last column [][](blank space similar box type). because of that i unable to load data into table. The delimiter is fixed width.

Please help me - Thanks in Advance.

You need to make the column big enough to capture the data in the source file, before trying to get rid of spaces.

Adjust your flat file source to give that column enough length to capture the data.

Then you can use a derived column to remove spaces from that field.|||

The Source file table name is :

Columns type Remarks MemberFirstName nchar(20) Firstname MemberLastname nchar(20) Lastname MemberPrefix nchar(4) <blank> MemberSuffix nchar(4) Suffix Status nchar(1) <blank>

Sample data like , only first name has value remaining columns blanks using of nchar data type.

While extrating the data , i am using Fixed width --> delimiter,even though last column giving problem

Ex:

MARIANN|||Your flat file mapping is not correct. There is more data coming in via the file than the source is set to handle. Fix that first.

2012年3月21日星期三

Flat file (CSV) source format

I have a SSIS package loading a lot of CSV file, which first line is the column head. Some file are ordered differently. However, package still try to load the file use predefined column order (it seems it doesn't check the head of each file see if it matchs the predefined column order).

Any way to force the package the check each file's head? or I had to manually check it using VB.Net script?

No, the Flat File connection manager cannot adapt to dynamic file formats. You can workaround with script. These threads should be helpful.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1408850&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1438953&SiteID=1