dbTalk Databases Forums  

SSIS Newbie

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


Discuss SSIS Newbie in the microsoft.public.sqlserver.dts forum.



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

Default SSIS Newbie - 09-10-2008 , 09:52 PM






Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM






Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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

Default RE: SSIS Newbie - 09-11-2008 , 08:31 AM



Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Quote:
Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


Reply With Quote
  #10  
Old   
sippyuconn
 
Posts: n/a

Default RE: SSIS Newbie - 09-14-2008 , 02:36 PM



Hi Todd

Thanks for the help

Couple questions
1)If I had an input file that has to be split to muliple tables - is that
best way to handle this is run the file thru Muliple Data Flow Tasks - 1 for
each table destination??

2)While I am importing into a table if I want to calculate a field on each
record
- say generate a new GUID for each record and put in a column - How would
I do that ???

3)I will have more questions - should I post here ???

Thanks for all your help

"Todd C" wrote:

Quote:
Hello Newbie:

Do your destination tables have Foreign Key constraints on them to maintain
the referential integrity?

What would happen if you got two records in Table 1 with the same Key value?
Would that ever happen? Or suppose you had a record in Tables 2 or 3 where
the Key value did NOT exist in table 1? (some things to think about)

Here is how I would approach this:
Create a package and add 3 Data Flow componenets to the Control Flow, then
hook them up with the green arrows so they execute one after another (in
series, not in parallel). In the first one, create a Text File source to
Table 1 file and send it to an OLE DB Destination (not SQL Destination)
connected to your SQL database. If you have a clustered index on the key of
SQL table 1, then you don't need to worry about sorting it before you load it.

On your destinations, select "Table or View", not "Table or View, Fast
Load"; then connect the RED output of the destination to a text file
destination. When you set this up, set it to "Redirect Row". This will allow
you to capture any rows that could not be loaded into the SQL table(s).

Do this for each of the tables in the other two Data Flows.

Keep us posted on your progress and let us know its going.
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"sippyuconn" wrote:

Hi

I am trying to learn SSIS by trail and error and I just need a little push
here
or pointed in the right direction :-)

I have a file dump from a Mainframe DB that I want to put into SQLServer

There a 3 files
1)Family Demographic
2)Family Property
3)Family Automobiles

TABLE1

key1 steve smith 100 Park Street NoWhere Fl xxxxx 222-222-1111


Table2

key1 100 Park Street NoWhere Fl xxxxx

key1 100 Park Street NoWhere MI xxxxx


Table3

key1 1997 Ford F150

key1 2005 Dodge Ram

There is a Key that ties all the related records accross the 3 files
There is a 1 to many relationship between
#1 and #2
#1 and #3

I want to sort the files to ensure I have the keys in order for all 3 tables
Then I want to read the files into a sql db

I am just looking for a suggestion on how to start - I have done some simple
tutorials but it was just reading a simlpe textfile into a single table

Thanks


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.