Importing multipe file formats with different schemas

rated by 0 users
This post has 12 Replies | 2 Followers

Top 10 Contributor
Points 800
gvamsimba Posted: 07-10-2009 14:18

Hi, I have a folder which contains files in .txt,
.csv and .xls with different schemas like customers,
orders etc..is it possible to create a SSIS Package
which can do it all dynamically creating destination
tables on the fly..

Many Thanks

  • Filed under:
  • | Post Points: 20
Top 10 Contributor
Male
Points 1.490

Dear vamsim,

I was thinking in you request during the day... it's easy to implement but you should make sure that all the schema are the same... :-)

Send me sample files of each type...:-)

Regards,

Pedro

  • | Post Points: 20
Top 10 Contributor
Points 800

Hi Pedro,
          Hope you had a good weekend..Here are 2 sample files..both are text files without headers but with
different schema..Is it possible to modify our previous package to handle this type of situation..

Many Thanks..

  • Filed under:
  • | Post Points: 5
Top 10 Contributor
Points 800
Top 10 Contributor
Male
Points 1.490

HI!

The suggestion you made before to use import txt and csv not make sense if the chema are different, correct? You told that was the same...

now... what you need from these 2 files?

regards,

Pedro

  • | Post Points: 20
Top 10 Contributor
Points 800

OK pedro,ignore it if it is not possible with different formats and
schema..
but in this case, its similar files with different schemas..
is it possible to create a package which can create destination
tables based on these file names on the fly ?

Thanks..

  • Filed under:
  • | Post Points: 20
Top 10 Contributor
Male
Points 1.490

Using standard components is not yet possible....

But you dont need the schema before import textfiles?

Regards,

Pedro

  • | Post Points: 20
Top 10 Contributor
Points 800

Ok Pedro, if it is not possible , then why dont you create the schema before the import ?

 

Thanks

  • Filed under:
  • | Post Points: 20
Top 10 Contributor
Male
Points 1.490

Ok.. you can create the schema before the package... but the package must know before you execute the schema that it'll receive...

Understood?!

Maybe some day, Microsft include a component for that!

:-)

regards!

Pedro

  • | Post Points: 20
Top 10 Contributor
Points 800

HI Pedro, what i mean to say is , cant we not create destination tables  in the database first and then

run the package pointing to these tables to load the files ?  its same like the package which you created initially

but with different schema this time..

 

Thanks..

  • Filed under:
  • | Post Points: 20
Top 10 Contributor
Male
Points 1.490

Yes you can,

But the problem is your source component that should know before the package run the schema that will be as input of your project.

Check the package I made for you before... you have a pre-defined source component with schema defined...

Regards,

Pedro

  • | Post Points: 20
Top 10 Contributor
Points 800

HI Pedro, just came back from holiday..

Yes, i do understand that we need to define the source
format,,In this case, is it not possible to define two
source schemas for the attached files and then load them
accordingly ?

Thanks

  • | Post Points: 20
Top 10 Contributor
Male
Points 1.490

Yes you can...I'm still on vacations... when I back I can make an example to you.

Just use a script task to ckeck the schema type and store it in a SSIS variable that will be used in expression that link this script task to the dataflow where you'll import data!

Regards,

Pedro

www.pedrocgd.blogspot.com

  • | Post Points: 5
Page 1 of 1 (13 items) | RSS