dbTalk Databases Forums  

SSIS Processing flat file with multiple record types

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS Processing flat file with multiple record types in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TimS
 
Posts: n/a

Default SSIS Processing flat file with multiple record types - 08-13-2006 , 12:11 PM






Hello, I am a novice with SSIS and have only used the DTS wizard to create
DTS packages. That being said, I was wondering if it is possible, and how
hard would it be to use SSIS to process a flat file that:

Is not delimited - is positional
Has multiple rows per object - a customer "record" consists of three
separate rows in the flat file. The first row starts with 1, the second row
starts with 2, etc.

There are multiple sets of rows with 1,2,3 that comprise several customer
"records"
Has a header and a trailer record.

Any advice would be appreciated!

Tim

Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: SSIS Processing flat file with multiple record types - 08-13-2006 , 01:31 PM






Wow! I imagine you would have to code a Script Component to do this. But SSIS
will definitely cope.

Charles Kangai, MCT, MCDBA

"TimS" wrote:

Quote:
Hello, I am a novice with SSIS and have only used the DTS wizard to create
DTS packages. That being said, I was wondering if it is possible, and how
hard would it be to use SSIS to process a flat file that:

Is not delimited - is positional
Has multiple rows per object - a customer "record" consists of three
separate rows in the flat file. The first row starts with 1, the second row
starts with 2, etc.

There are multiple sets of rows with 1,2,3 that comprise several customer
"records"
Has a header and a trailer record.

Any advice would be appreciated!

Tim

Reply With Quote
  #3  
Old   
Charles Kangai
 
Posts: n/a

Default RE: SSIS Processing flat file with multiple record types - 08-13-2006 , 02:54 PM



A second approach would be to use regular expressions to search for and
delete all carriage return linefeed characters that are not immediately
followed by a 1. You then save the resultant text as a new file. You can then
import this new file, because it will have one row per line. Your text file
is not field delimited, and that is no problem for SSIS.

Probably this approach would be easier than creating a Script component! In
fact it should be no more than a few lines of code, maybe less than 10!

Charles Kangai, MCT, MCDBA



"Charles Kangai" wrote:

Quote:
Wow! I imagine you would have to code a Script Component to do this. But SSIS
will definitely cope.

Charles Kangai, MCT, MCDBA

"TimS" wrote:

Hello, I am a novice with SSIS and have only used the DTS wizard to create
DTS packages. That being said, I was wondering if it is possible, and how
hard would it be to use SSIS to process a flat file that:

Is not delimited - is positional
Has multiple rows per object - a customer "record" consists of three
separate rows in the flat file. The first row starts with 1, the second row
starts with 2, etc.

There are multiple sets of rows with 1,2,3 that comprise several customer
"records"
Has a header and a trailer record.

Any advice would be appreciated!

Tim

Reply With Quote
  #4  
Old   
TimS
 
Posts: n/a

Default RE: SSIS Processing flat file with multiple record types - 08-14-2006 , 10:31 PM



Thank you for your response Charles. I will try out your suggestions.

Tim

"Charles Kangai" wrote:

Quote:
A second approach would be to use regular expressions to search for and
delete all carriage return linefeed characters that are not immediately
followed by a 1. You then save the resultant text as a new file. You can then
import this new file, because it will have one row per line. Your text file
is not field delimited, and that is no problem for SSIS.

Probably this approach would be easier than creating a Script component! In
fact it should be no more than a few lines of code, maybe less than 10!

Charles Kangai, MCT, MCDBA



"Charles Kangai" wrote:

Wow! I imagine you would have to code a Script Component to do this. But SSIS
will definitely cope.

Charles Kangai, MCT, MCDBA

"TimS" wrote:

Hello, I am a novice with SSIS and have only used the DTS wizard to create
DTS packages. That being said, I was wondering if it is possible, and how
hard would it be to use SSIS to process a flat file that:

Is not delimited - is positional
Has multiple rows per object - a customer "record" consists of three
separate rows in the flat file. The first row starts with 1, the second row
starts with 2, etc.

There are multiple sets of rows with 1,2,3 that comprise several customer
"records"
Has a header and a trailer record.

Any advice would be appreciated!

Tim

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.