Go Back   CORTEX Forums > Local Happenings > CORTEX Blogs > BI Monkey
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Flat File Source Error: The column delimiter for column [ColumnName] was not found

This is a discussion on Flat File Source Error: The column delimiter for column [ColumnName] was not found within the BI Monkey forums, part of the CORTEX Blogs category; Today when trying to import an Oracle sourced delimited file, this error cropped up: [ Flat File Source [1]] Error: The column delimiter for column “ColumnName” was not found. [Flat ...


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 30th June 2009, 12:21 PM   #1
Guru
 
Join Date: Jun 2009
Posts: 122
James Beresford is on a distinguished road
Thumbs up Flat File Source Error: The column delimiter for column [ColumnName] was not found

Today when trying to import an Oracle sourced delimited file, this error cropped up:

[Flat File Source [1]] Error: The column delimiter for column “ColumnName” was not found.
[Flat File Source [1]] Error: An error occurred while processing file “MyTextFile” on data row [nnnn].
Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.* The PrimeOutput method on component “Flat File Source” (1) returned error code 0xC0202092.* The component returned a failure code when etc etc…


Now this was despite the Error Output Disposition for this column being set to “Redirect Row”. So regardless of how I configured the Error Handling of the source, a single bad row would kill the load of the file.

Courtesy of a method described by jwelch at AgileBI.com I approached the issue by importing the entire contents of the file into a single column, then parsing it in a script task. So the first step was to import the entire text file into a database as a single column. This can be done by configuring the connection manager as below, setting the single column as delimited by the row delimiter:



Fig 1: Configuring the Flat File for a Single Column import of all data




Then I processed the data from the database table in a script task acting as a transformation on the Data Flow, with a script that read pretty much like jwelch’s. It splits the data via a delimiter using the VB Split() function, with the advantage that you can handle cases where there is an incorrect number of columns, and fixing a row in a database for reload is a lot easier than trying to find and fix a row in a massive text file.

Example script:

Public Class ScriptMain*** Inherits UserComponent*** Private columnDelimiter() As Char = CType(",", Char())*** Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)******* Dim rowValues As String() ******* rowValues = Row.Line.Split(columnDelimiter) ' Test Correct number of rows******* If rowValues.GetUpperBound(0) 2 Then*********** 'Row is not complete - Handle error*********** Row.Column001_IsNull = True*********** Row.Column002_IsNull = True*********** Row.Column003_IsNull = True******* Else ' Row is OK, output values*********** Row.Column001 = rowValues.GetValue(0).ToString()************Row.Column002 = rowValues.GetValue(1).ToString()*********** Row.Column003 = rowValues.GetValue(2).ToString()********End If*** End SubEnd ClassExcept mine had 180 columns(!), which caused me a fair amount of mouse clicking to set up all the output columns on the Script Component. The file came through, however, successfully bypassing the flaw in the Flat File Source.

Jamie Thompson offers a slightly different approach, and there are some useful tips in the comments for that post.



More...
James Beresford is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The Copy Column Transformation James Beresford BI Monkey 0 25th June 2009 10:12 PM
Flat File Import tips James Beresford BI Monkey 0 23rd June 2009 09:34 PM
Open Source Jane B Forecasting Special Interest Group 3 2nd April 2009 04:18 PM
Open Source admin Reporting Tips and Techniques 5 7th February 2009 01:12 PM
Welcome To Open Source admin Open Source Analytics 1 7th February 2009 01:11 PM


All times are GMT +11. The time now is 03:35 AM.

© The Business Intelligence Group

Search Engine Optimization by vBSEO