SlideShare uma empresa Scribd logo
1 de 23
MULTIPLE FILES - SINGLE TARGET TABLE-SINGLE INTERFACE


Steps to use a single interface to load all the flat files of same structure into the single target
table.


Let's consider that you have three Flat files namely FILE1.txt,FILE2.txt and FILE3.txt to be
loaded into TRG_TBL table of ORACLE database.

In order to achieve this scenario, first of all you need to create a simple ODI routine to load data
from FILE.txt file to TRG_TBL, by performing following steps.


Go to Start > Programs > Oracle > Oracle Data Integrator > ODI Studio .

Select DSBWR13 from the Login Name drop-down. Enter SUPERVISOR in the User field and
password in the Password field. Click OK to login.




Go to Topology Manager >> Physical Architecture >> File >> FILE_GENERIC. Right click on
FILE_GENERIC and select New Physical schema. See below screen shot for more info.
Enter complete path where your data files are located under Schema and Work Schema fields
and press Save button.
In topology manager, go to Logical Architecture >> File. Right click on File technology and
select New Logical Schema.
Choose Physical schema under Global context.




Create new project and import LKM File to SQL and IKM SQL Control Append knowledge
modules.


Now, you need to reverse engineer source file.

Insert new model.
Right click on your newly create data model and select New Datastore.
Enter details required for creating Datastore and press Save button. See below screens for more
details.
Now create RDBMS schema/user by executing below SQL query.

SQL> create user ODI_MULTI_TEST identified by password default tablespace users
temporary tablespace temp;

Grant privileges to ODI_MULTI_TEST user using below command.

SQL> grant connect, resource to ODI_MULTI_TEST;

Connect to SQL using this newly create user and execute following commands.
SQL> conn ODI_MULTI_TEST
Enter password:
Connected.
SQL> CREATE TABLE SRC_FILE_DETAILS
 2 ( FILE_NAME VARCHAR2(10 BYTE)
 3 );

Table created.

SQL> INSERT INTO src_file_details values ('FILE1');

1 row created.

SQL> INSERT INTO src_file_details values ('FILE2');

1 row created.

SQL> INSERT INTO src_file_details values ('FILE3');

1 row created.


Create target table.


SQL> CREATE TABLE TRG_TBL (
 2 "EMPNO" NUMBER(10,0) NOT NULL,
 3 "ENAME" VARCHAR2(200),
 4 "JOB" VARCHAR2(200),
 5 "MGR" VARCHAR2(200),
 6 "HIREDATE" VARCHAR2(200),
 7 "SAL" VARCHAR2(200),
 8 "COMM" VARCHAR2(200),
 9 "DEPTNO" VARCHAR2(200),
10 CONSTRAINT "TRG_TBL_PK" PRIMARY KEY ("EMPNO")
11 );

Table created.


Now you need to create variables by performing below steps:

In Designer panel, go to Projects >> [PROJECTNAME] >> Variables.
Right click Variables and select New Variable.

See below screens for variable creation steps.
In order to create target data server, perform the below steps:

In topology manager, go to Physical Architecture >> Oracle technology. Right click on Oracle
technology and select Insert Data Server.

Enter required parameters and press Save button.
Insert Physical Schema
Insert Logical Schema




Create Target Model
Reverse engineer target model.
Reverse engineering model produces below output.




Do some modifications on source (file) data store.

Replace the resource name with #Project_Name.FILE_NAME.txt
Create Interface
Create Package
Click on Diagram tab.

Drag and drop count variable under diagram section of package.




Drag and drop File_Name variable.
Drag and drop MULTITEST interface.
Drag and drop count variable




Drag and drop Files_Count variable.
Drag and drop count variable.




Now, customized your package. It should look like below screen.
Before executing package, verify that your target table is empty, by performing following steps.

In Designer, go to Model >> TRG_TBL. Right click on TRG_TBL and select View Data.




It will show you TRG_TBL table content.




Your target table is empty. Now execute the package by performing below steps.

In Designer, go to Projects >> [YOURPROJECT] >> Packages >> [YOURPACKAGE].

Right click on [YOURPACKAGE] and select execute.
You can see the result of your package execution either in Operator or by viewing data of your
target table directly from Designer.
That's it, you have now successfully loaded data from multiple files to a single target table using
single interface.

Mais conteúdo relacionado

Mais procurados

View, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - ThaiptView, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - Thaipt
Framgia Vietnam
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
Hasan Kata
 
Oracle data integrator project
Oracle data integrator projectOracle data integrator project
Oracle data integrator project
Amit Sharma
 

Mais procurados (20)

Oracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & DescriptionsOracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & Descriptions
 
View, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - ThaiptView, Store Procedure & Function and Trigger in MySQL - Thaipt
View, Store Procedure & Function and Trigger in MySQL - Thaipt
 
snowpro (1).pdf
snowpro (1).pdfsnowpro (1).pdf
snowpro (1).pdf
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and Answers
 
SAP BW - Info cube
SAP BW - Info cubeSAP BW - Info cube
SAP BW - Info cube
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
 
SQL
SQLSQL
SQL
 
Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
Oracle data integrator project
Oracle data integrator projectOracle data integrator project
Oracle data integrator project
 
Oracle forms personalization
Oracle forms personalizationOracle forms personalization
Oracle forms personalization
 
Tableau functions
Tableau   functionsTableau   functions
Tableau functions
 
Best Practices with ODI : Flexibility
Best Practices with ODI : FlexibilityBest Practices with ODI : Flexibility
Best Practices with ODI : Flexibility
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
Sql triggers
Sql triggersSql triggers
Sql triggers
 
Cancellations in Order Management
Cancellations in Order ManagementCancellations in Order Management
Cancellations in Order Management
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
Microsoft SQL Server Database Administration.pptx
Microsoft SQL Server Database Administration.pptxMicrosoft SQL Server Database Administration.pptx
Microsoft SQL Server Database Administration.pptx
 
Informatica Powercenter Architecture
Informatica Powercenter ArchitectureInformatica Powercenter Architecture
Informatica Powercenter Architecture
 
Inventory receiving processes for serial controlled items
Inventory receiving processes for serial controlled itemsInventory receiving processes for serial controlled items
Inventory receiving processes for serial controlled items
 
MongoDB
MongoDBMongoDB
MongoDB
 

Semelhante a Multiple files single target single interface

Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docxLab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
VinaOconner450
 
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docxLab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
DIPESH30
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
GEBS Reporting
 
Previous weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docxPrevious weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docx
keilenettie
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
nesmaddy
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5
Matthew Moldvan
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docx
arnit1
 
systems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docxsystems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docx
perryk1
 
ELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_JeffELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_Jeff
Jeff McQuigg
 

Semelhante a Multiple files single target single interface (20)

OBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation StepsOBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation Steps
 
Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docxLab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.).docx
 
154090896 installation-of-oracle-database-12c
154090896 installation-of-oracle-database-12c154090896 installation-of-oracle-database-12c
154090896 installation-of-oracle-database-12c
 
Creating a repository using the oracle business intelligence administration tool
Creating a repository using the oracle business intelligence administration toolCreating a repository using the oracle business intelligence administration tool
Creating a repository using the oracle business intelligence administration tool
 
Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...
 
Database development connection steps
Database development connection stepsDatabase development connection steps
Database development connection steps
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studio
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studio
 
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docxLab 2 Work with Dictionary and Create Relational Database (60 pts.docx
Lab 2 Work with Dictionary and Create Relational Database (60 pts.docx
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
 
Previous weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docxPrevious weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docx
 
3 tier architecture in asp.net
3 tier architecture in asp.net3 tier architecture in asp.net
3 tier architecture in asp.net
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5
 
ALL NEW OOP 2014
ALL NEW OOP 2014ALL NEW OOP 2014
ALL NEW OOP 2014
 
Create Components in TomatoCMS
Create Components in TomatoCMSCreate Components in TomatoCMS
Create Components in TomatoCMS
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docx
 
systems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docxsystems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docx
 
ELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_JeffELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_Jeff
 
Pl lab solution
Pl lab solutionPl lab solution
Pl lab solution
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Último (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Multiple files single target single interface

  • 1. MULTIPLE FILES - SINGLE TARGET TABLE-SINGLE INTERFACE Steps to use a single interface to load all the flat files of same structure into the single target table. Let's consider that you have three Flat files namely FILE1.txt,FILE2.txt and FILE3.txt to be loaded into TRG_TBL table of ORACLE database. In order to achieve this scenario, first of all you need to create a simple ODI routine to load data from FILE.txt file to TRG_TBL, by performing following steps. Go to Start > Programs > Oracle > Oracle Data Integrator > ODI Studio . Select DSBWR13 from the Login Name drop-down. Enter SUPERVISOR in the User field and password in the Password field. Click OK to login. Go to Topology Manager >> Physical Architecture >> File >> FILE_GENERIC. Right click on FILE_GENERIC and select New Physical schema. See below screen shot for more info.
  • 2. Enter complete path where your data files are located under Schema and Work Schema fields and press Save button.
  • 3. In topology manager, go to Logical Architecture >> File. Right click on File technology and select New Logical Schema.
  • 4. Choose Physical schema under Global context. Create new project and import LKM File to SQL and IKM SQL Control Append knowledge modules. Now, you need to reverse engineer source file. Insert new model.
  • 5. Right click on your newly create data model and select New Datastore.
  • 6. Enter details required for creating Datastore and press Save button. See below screens for more details.
  • 7. Now create RDBMS schema/user by executing below SQL query. SQL> create user ODI_MULTI_TEST identified by password default tablespace users temporary tablespace temp; Grant privileges to ODI_MULTI_TEST user using below command. SQL> grant connect, resource to ODI_MULTI_TEST; Connect to SQL using this newly create user and execute following commands.
  • 8. SQL> conn ODI_MULTI_TEST Enter password: Connected. SQL> CREATE TABLE SRC_FILE_DETAILS 2 ( FILE_NAME VARCHAR2(10 BYTE) 3 ); Table created. SQL> INSERT INTO src_file_details values ('FILE1'); 1 row created. SQL> INSERT INTO src_file_details values ('FILE2'); 1 row created. SQL> INSERT INTO src_file_details values ('FILE3'); 1 row created. Create target table. SQL> CREATE TABLE TRG_TBL ( 2 "EMPNO" NUMBER(10,0) NOT NULL, 3 "ENAME" VARCHAR2(200), 4 "JOB" VARCHAR2(200), 5 "MGR" VARCHAR2(200), 6 "HIREDATE" VARCHAR2(200), 7 "SAL" VARCHAR2(200), 8 "COMM" VARCHAR2(200), 9 "DEPTNO" VARCHAR2(200), 10 CONSTRAINT "TRG_TBL_PK" PRIMARY KEY ("EMPNO") 11 ); Table created. Now you need to create variables by performing below steps: In Designer panel, go to Projects >> [PROJECTNAME] >> Variables. Right click Variables and select New Variable. See below screens for variable creation steps.
  • 9.
  • 10. In order to create target data server, perform the below steps: In topology manager, go to Physical Architecture >> Oracle technology. Right click on Oracle technology and select Insert Data Server. Enter required parameters and press Save button.
  • 14. Reverse engineering model produces below output. Do some modifications on source (file) data store. Replace the resource name with #Project_Name.FILE_NAME.txt
  • 17. Click on Diagram tab. Drag and drop count variable under diagram section of package. Drag and drop File_Name variable.
  • 18. Drag and drop MULTITEST interface.
  • 19. Drag and drop count variable Drag and drop Files_Count variable.
  • 20. Drag and drop count variable. Now, customized your package. It should look like below screen.
  • 21. Before executing package, verify that your target table is empty, by performing following steps. In Designer, go to Model >> TRG_TBL. Right click on TRG_TBL and select View Data. It will show you TRG_TBL table content. Your target table is empty. Now execute the package by performing below steps. In Designer, go to Projects >> [YOURPROJECT] >> Packages >> [YOURPACKAGE]. Right click on [YOURPACKAGE] and select execute.
  • 22. You can see the result of your package execution either in Operator or by viewing data of your target table directly from Designer.
  • 23. That's it, you have now successfully loaded data from multiple files to a single target table using single interface.