dbTalk Databases Forums  

What approach to importing a large text file?

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


Discuss What approach to importing a large text file? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
imani_technology_spam@yahoo.com
 
Posts: n/a

Default What approach to importing a large text file? - 01-06-2010 , 04:15 PM






Here are the details:

- Source is a 5 GB text file. It is in a "ragged right" format with
NO character delimiters.
- Destination is 20 tables.

What is the most efficient approach to importing this large text
file? Should I attempt a bulk insert task? Will that work
considering that I'm going from one source file to 20 destination
tables? If I use the bulk insert task, how do I construct the format
file?

Reply With Quote
  #2  
Old   
tbradshaw via SQLMonster.com
 
Posts: n/a

Default Re: What approach to importing a large text file? - 01-07-2010 , 11:36 AM






Imani,

You have a few choices here, but one thing is certain: you cannot import
directly into 20 destination tables. You will either
(1) Import it all into a single Load table, then use SQL tasks to disperse it
out to 20 destination table, or
(2) Clean your file ahead of import and perhaps divide it into 20 files
suitable for import.

I personally use option (2) the most. (C# based cleaning application). This
gives me a chance to scrub, validate & divide data prior to import. It also
cuts down on the amount of bad data. Why import bad data when you're going
to throw it away anyway.

Tip: make sure you load the files from a local drive, not over a network.

Finally, in my experience, bulk insert is considerably faster than a Data
Pump, especially when there aren't any transformations involved.

Let us know how you make out.

Best Regards,
Tom

Thomas Bradshaw
Data Integration Services
MyWebGrocer Inc

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/201001/1

Reply With Quote
  #3  
Old   
imani_technology_spam@yahoo.com
 
Posts: n/a

Default Re: What approach to importing a large text file? - 01-07-2010 , 04:02 PM



Is there an interim "holding place" similar to a load table within
SSIS where I can place the data, without using a SQL Server database
table?

On Jan 7, 9:36*am, "tbradshaw via SQLMonster.com" <u12692@uwe> wrote:
Quote:
Imani,

You have a few choices here, but one thing is certain: *you cannot import
directly into 20 destination tables. *You will either
(1) Import it all into a single Load table, then use SQL tasks to disperse it
out to 20 destination table, or
(2) Clean your file ahead of import and perhaps divide it into 20 files
suitable for import.

I personally use option (2) the most. *(C# based cleaning application).*This
gives me a chance to scrub, validate & divide data prior to import. *Italso
cuts down on the amount of bad data. *Why import bad data when you're going
to throw it away anyway.

Tip: *make sure you load the files from a local drive, not over a network.

Finally, in my experience, bulk insert is considerably faster than a Data
Pump, especially when there aren't any transformations involved.

Let us know how you make out.

Best Regards,
Tom

Thomas Bradshaw
Data Integration Services
MyWebGrocer Inc

--
Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-dts/201001/1

Reply With Quote
  #4  
Old   
Todd C
 
Posts: n/a

Default Re: What approach to importing a large text file? - 01-08-2010 , 08:00 AM



You may want to go with a Conditional Split to direct rows to the proper
destination.

Can you give us a sample of your raw data? How would one determine that a
row belongs to one particular table?
--
Todd C
MCTS SQL Server 2005


"imani_technology_spam (AT) yahoo (DOT) com" wrote:

Quote:
Is there an interim "holding place" similar to a load table within
SSIS where I can place the data, without using a SQL Server database
table?

On Jan 7, 9:36 am, "tbradshaw via SQLMonster.com" <u12692@uwe> wrote:
Imani,

You have a few choices here, but one thing is certain: you cannot import
directly into 20 destination tables. You will either
(1) Import it all into a single Load table, then use SQL tasks to disperse it
out to 20 destination table, or
(2) Clean your file ahead of import and perhaps divide it into 20 files
suitable for import.

I personally use option (2) the most. (C# based cleaning application). This
gives me a chance to scrub, validate & divide data prior to import. It also
cuts down on the amount of bad data. Why import bad data when you're going
to throw it away anyway.

Tip: make sure you load the files from a local drive, not over a network.

Finally, in my experience, bulk insert is considerably faster than a Data
Pump, especially when there aren't any transformations involved.

Let us know how you make out.

Best Regards,
Tom

Thomas Bradshaw
Data Integration Services
MyWebGrocer Inc

--
Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-dts/201001/1

.

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.