dbTalk Databases Forums  

Import Multiple Files -- without table definitions

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


Discuss Import Multiple Files -- without table definitions in the microsoft.public.sqlserver.dts forum.



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

Default Import Multiple Files -- without table definitions - 07-21-2006 , 12:17 PM






Hi there,

I have seen articles that import mulitple files into SQL Server but
they all create a table
first to do the import.

the table definition would kinda be complex coz the number of columns
varies from 4 -80 for about 50 files.

I can import them individually without having to define the tables.(if
the data is not that big, that is.otherwise, I need to chop it down
into multiple files)

is there a way to do this?


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Import Multiple Files -- without table definitions - 07-24-2006 , 01:49 PM






Hello weirdscientist78 (AT) gmail (DOT) com,


I am not sure what you want to do here.

are you wanting to define the table structure on every import?

Do you want to point the file to the correct table depending on the amount
of columns in the file?


I would still be trying to define the tables up front of any import and I
would segregate the files based on their structure and destination.

Surely you know how many varieties of file you have?




Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi there,

I have seen articles that import mulitple files into SQL Server but
they all create a table
first to do the import.
the table definition would kinda be complex coz the number of columns
varies from 4 -80 for about 50 files.

I can import them individually without having to define the tables.(if
the data is not that big, that is.otherwise, I need to chop it down
into multiple files)

is there a way to do this?




Reply With Quote
  #3  
Old   
rockicooki (Offline)
Junior Member
 
Posts: 1
Join Date: Jul 2006

Default Same problem - Import Multiple Files with pivoted with varying columns - 07-26-2006 , 09:36 AM



Hi

I have a situation where I have to import multiple .csv files. The number of columns may differ in the files and the data is pivoted.. needs to be unpivoted.

The destination table is the same for all these files. Once unpivoted, data looks similar.

In SSIS,
- is it possible to do a dynamic lookup of columns?

Thanks

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Import Multiple Files -- without table definitions - 07-26-2006 , 01:10 PM



So you are in SSIS

There is the Pivot transform but the issue with that is the same as with the
Pivot() statement in TSQL. It is not dynamic.

You can't really just add columns to the pipeline in SSIS either as it is
very metadata driven and this would be a bad thing.

If these files are from the same provider then I would be pushing back for
standardisation

OR

I would look to build a pipeline for each file type and I would also
segregate the files based on their construction into seperate folders

That said you may be able to make the whole row be a single column instead
of being a series of columns and then do some splitting. Similar to this


The Script Component(As A Transform)
(http://www.sqlis.com/default.aspx?307)

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



"rockicooki" <rockicooki.2bk5dz (AT) no-mx (DOT) forums.yourdomain.com.au> wrote in
message news:rockicooki.2bk5dz (AT) no-mx (DOT) forums.yourdomain.com.au...
Quote:
Hi

I have a situation where I have to import multiple .csv files. The
number of columns may differ in the files and the data is pivoted..
needs to be unpivoted.

The destination table is the same for all these files. Once unpivoted,
data looks similar.

In SSIS,
- is it possible to do a dynamic lookup of columns?

Thanks


--
rockicooki





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.