Reg combining the data from 3 oracle tables
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Sun Jan 23, 2005 3:36 pm
Reg combining the data from 3 oracle tables
Hi All,
Iam new to DS.I have a server job in which I need to combine 3 different oracle tables into one Oracle Target db.How do achieve this.any pointers plz..
Thanks a lot
Iam new to DS.I have a server job in which I need to combine 3 different oracle tables into one Oracle Target db.How do achieve this.any pointers plz..
Thanks a lot
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
Are all these tables in the same database? If so, and no transformation or checking is required, bypass DataStage and do the whole thing within Oracle.
Otherwise, use the same SELECT statement to feed data into DataStage (that is, perform the join in Oracle), and load the fourth table from DataStage.
If the tables are in different databases, load the two probe tables into DataStage hashed files, remembering only to load rows and columns that are actually needed for the task, and perform standard reference lookups against these.
Are all these tables in the same database? If so, and no transformation or checking is required, bypass DataStage and do the whole thing within Oracle.
Code: Select all
INSERT INTO table4(column_list)
SELECT columns FROM table1, table2, table3 WHERE join_criteria ;
If the tables are in different databases, load the two probe tables into DataStage hashed files, remembering only to load rows and columns that are actually needed for the task, and perform standard reference lookups against these.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 24
- Joined: Sun Jan 23, 2005 3:36 pm
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
If you can dissect the full source data into multiple chunks, you can make use of multiple instance option in DataStage and achieve as you mentioned.
Also you can try to break the source using some partition and supply it in the 'where clause' of the SQL that Ray provided.
Eg. insert into table (column list)
select column_list from table where condition AND partition_logic
where partition_logic can be used to break down the data segments into smaller bits - preferably on the way you have partitioned your db (table)
Also you can try to break the source using some partition and supply it in the 'where clause' of the SQL that Ray provided.
Eg. insert into table (column list)
select column_list from table where condition AND partition_logic
where partition_logic can be used to break down the data segments into smaller bits - preferably on the way you have partitioned your db (table)
-
- Participant
- Posts: 24
- Joined: Sun Jan 23, 2005 3:36 pm
-
- Participant
- Posts: 24
- Joined: Sun Jan 23, 2005 3:36 pm
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
You can use both the DataStage and SQL query option when they are in the same db. But you need to make sure that there is enought rollback segment space to utilize this functionality.
Also if you are creating the result into a target flat file (which can also be a named pipe), you can use sql loader to load into partitions and have options like disabled index, direct load etc.
Also if you are creating the result into a target flat file (which can also be a named pipe), you can use sql loader to load into partitions and have options like disabled index, direct load etc.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom