all groups > sql server dts > july 2006 >
You're in the

sql server dts

group:

Import Multiple Files -- without table definitions


Import Multiple Files -- without table definitions weirdscientist78 NO[at]SPAM gmail.com
7/21/2006 10:17:23 AM
sql server dts:
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?
Re: Import Multiple Files -- without table definitions Allan Mitchell
7/24/2006 11:49:41 AM
Hello weirdscientist78@gmail.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

[quoted text, click to view]

Re: Import Multiple Files -- without table definitions rockicooki
7/26/2006 9:36:26 AM

Hi

I have a situation where I have to import multiple .csv files. Th
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?

Thank

--
rockicook
-----------------------------------------------------------------------
rockicooki's Profile: http://www.dbtalk.net/m57
View this thread: http://www.dbtalk.net/t32076
Re: Import Multiple Files -- without table definitions Allan Mitchell
7/26/2006 7:10:24 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@no-mx.forums.yourdomain.com.au> wrote in
message news:rockicooki.2bk5dz@no-mx.forums.yourdomain.com.au...
[quoted text, click to view]

AddThis Social Bookmark Button