Wrox Programmer Forums
|
BOOK: Professional Microsoft SQL Server 2008 Integration Services ISBN: 978-0-470-24795-2
This is the forum to discuss the Wrox book Professional Microsoft SQL Server 2008 Integration Services by Brian Knight, Erik Veerman, Grant Dickinson, Douglas Hinson, Darren Herbold; ISBN: 9780470247952
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Microsoft SQL Server 2008 Integration Services ISBN: 978-0-470-24795-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2011, 04:26 PM
Registered User
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SSIS Script Component - Parsing Text Files Dynamically

Hello Community:

Essentially, I am trying to read an incoming text file(s) and these files are going through a ForEach Loop and assigning variable for the file name that is being used in the data flow section for the Flat File Source object.

Then I use a Script Component object (C#) set as destination type. I am in need of code that can read a text file and dynamically insert into different tables based on the column values received for a particular data set. The challenge is that the data sets are not standardize contained in a single text file. One data set can have 10 columns and the next data set can have 20 columns. A space is the indicator that there is a new data set inside of the text file (which could have 500 - 1000 data sets per text file). I am able to create set values (using Script Component type of Transformation) and push out to SQL db with no problem but issue is sometimes there are 1000 columns and I do not want to hard code that many columns. The other issue is that the columns are not always in the same sequence and when you have it as set values they have to be in the same sequence as the text file or it will skip the output value. does anyone have any examples I can leverage in C#? Thanks.....





Similar Threads
Thread Thread Starter Forum Replies Last Post
SSIS Script for Monitoring Windows Service deepumi SQL Server 2005 0 May 25th, 2006 04:41 AM
Script Component as Destination bmains SQL Server 2000 0 May 23rd, 2005 01:30 PM
Parsing TEXT files - VERY HARD!! cplusruss Pro VB 6 2 March 24th, 2005 05:55 AM
script editor component madhukp VB Components 1 November 22nd, 2004 05:32 AM
How to register a .wsc component dynamically? yornway Classic ASP Components 0 July 15th, 2003 04:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.