SlideShare une entreprise Scribd logo
1  sur  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.

Contenu connexe

Tendances

JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)Faysal Shaarani (MBA)
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC ArchitecturePrem Sanil
 
SQL Server Integration Services – Enterprise Manageability
SQL Server Integration Services – Enterprise ManageabilitySQL Server Integration Services – Enterprise Manageability
SQL Server Integration Services – Enterprise ManageabilityDan English
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaEdureka!
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideSrinimf-Slides
 
Odi 11g master and work repository creation steps
Odi 11g master and work repository creation stepsOdi 11g master and work repository creation steps
Odi 11g master and work repository creation stepsDharmaraj Borse
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-PresentationChuck Walker
 
05 Creating Stored Procedures
05 Creating Stored Procedures05 Creating Stored Procedures
05 Creating Stored Proceduresrehaniltifat
 

Tendances (20)

JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)
 
Net framework
Net frameworkNet framework
Net framework
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
SQL Server Integration Services – Enterprise Manageability
SQL Server Integration Services – Enterprise ManageabilitySQL Server Integration Services – Enterprise Manageability
SQL Server Integration Services – Enterprise Manageability
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
 
ASP.NET- database connectivity
ASP.NET- database connectivityASP.NET- database connectivity
ASP.NET- database connectivity
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | Edureka
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
 
Odi 11g master and work repository creation steps
Odi 11g master and work repository creation stepsOdi 11g master and work repository creation steps
Odi 11g master and work repository creation steps
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-Presentation
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
MySQL Basics
MySQL BasicsMySQL Basics
MySQL Basics
 
Odi interview questions
Odi interview questionsOdi interview questions
Odi interview questions
 
Jdbc
JdbcJdbc
Jdbc
 
05 internal tables
05 internal tables05 internal tables
05 internal tables
 
SSIS control flow
SSIS control flowSSIS control flow
SSIS control flow
 
05 Creating Stored Procedures
05 Creating Stored Procedures05 Creating Stored Procedures
05 Creating Stored Procedures
 

En vedette

Hyperion planning integration with odi
Hyperion planning integration with odiHyperion planning integration with odi
Hyperion planning integration with odiAmit Sharma
 
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)Darshankumar Prajapati
 
Hyperion essbase integration with odi
Hyperion essbase integration with odiHyperion essbase integration with odi
Hyperion essbase integration with odiAmit Sharma
 
Hyperion Essbase integration with ODI
Hyperion Essbase integration with ODIHyperion Essbase integration with ODI
Hyperion Essbase integration with ODIDharmaraj Borse
 
Best Practices with ODI : Flexibility
Best Practices with ODI : FlexibilityBest Practices with ODI : Flexibility
Best Practices with ODI : FlexibilityGurcan Orhan
 
Tech practice proposition
Tech practice propositionTech practice proposition
Tech practice propositionEwan Rawlings
 

En vedette (6)

Hyperion planning integration with odi
Hyperion planning integration with odiHyperion planning integration with odi
Hyperion planning integration with odi
 
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
 
Hyperion essbase integration with odi
Hyperion essbase integration with odiHyperion essbase integration with odi
Hyperion essbase integration with odi
 
Hyperion Essbase integration with ODI
Hyperion Essbase integration with ODIHyperion Essbase integration with ODI
Hyperion Essbase integration with ODI
 
Best Practices with ODI : Flexibility
Best Practices with ODI : FlexibilityBest Practices with ODI : Flexibility
Best Practices with ODI : Flexibility
 
Tech practice proposition
Tech practice propositionTech practice proposition
Tech practice proposition
 

Similaire à LOAD MULTIPLE FILES TO SINGLE TABLE

OBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation StepsOBIEE 11g : Repository Creation Steps
OBIEE 11g : Repository Creation StepsDharmaraj Borse
 
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.).docxVinaOconner450
 
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 toolRavi Kumar Lanke
 
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...Aeric Poon
 
Database development connection steps
Database development connection stepsDatabase development connection steps
Database development connection stepsAravindharamanan S
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studioAravindharamanan S
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studioAravindharamanan S
 
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.docxDIPESH30
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSGEBS 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.docxkeilenettie
 
3 tier architecture in asp.net
3 tier architecture in asp.net3 tier architecture in asp.net
3 tier architecture in asp.netRavi Bansal
 
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 2nesmaddy
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5Matthew 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.docxarnit1
 
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 .docxperryk1
 
ELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_JeffELT Publishing Tool Overview V3_Jeff
ELT Publishing Tool Overview V3_JeffJeff McQuigg
 

Similaire à LOAD MULTIPLE FILES TO SINGLE TABLE (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
 

Dernier

How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 

Dernier (20)

How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 

LOAD MULTIPLE FILES TO SINGLE TABLE

  • 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.