Reading from XML File in Oracle Data Integrator - Part2
In my last post part-1 of this series Write to XML, I showed how to reverse engineer xml chema into ODI and write table data to XML File. In this post, I will continue the part 2 of the series and show how to read data from XML file and load to external tables.
If you are just looking for information just to read from xml file, the pre-requisite is to complete the topology and data model configuration in the part 1 of this series Write to XML before continuing this tutorial .
So lets get started...
Since we have the topology and model already configured in part1, we just need to load the xml file to XML_STAGING schema and then use table to table mapping for the tables from xml_staging to target tables.
I am going to use data_target schema (new schema created) as target schema and i will be creating the region, countries, locations, departments and employees table in this schema without data. We will load data to these tables from XML. Here are the DDLs for these tables. Please note here that I am continuing with country_num new columns created for country and location tables as I showed in part 1.
CREATE TABLE "DATA_TARGET"."REGIONS"
(
"REGION_ID" NUMBER NOT NULL ENABLE,
"REGION_NAME" VARCHAR2(25 BYTE)
)
CREATE TABLE "DATA_TARGET"."COUNTRIES"
(
"COUNTRY_ID" CHAR(2 BYTE) NOT NULL ENABLE,
"COUNTRY_NAME" VARCHAR2(40 BYTE),
"REGION_ID" NUMBER,
"COUNTRY_NUM" NUMBER(16,0)
)
CREATE TABLE "DATA_TARGET"."LOCATIONS"
(
"LOCATION_ID" NUMBER(4,0),
"STREET_ADDRESS" VARCHAR2(40 BYTE),
"POSTAL_CODE" VARCHAR2(12 BYTE),
"CITY" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"STATE_PROVINCE" VARCHAR2(25 BYTE),
"COUNTRY_ID" CHAR(2 BYTE),
"COUNTRY_NUM" NUMBER(16,0)
)
CREATE TABLE "DATA_TARGET"."DEPARTMENTS"
(
"DEPARTMENT_ID" NUMBER(4,0),
"DEPARTMENT_NAME" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"MANAGER_ID" NUMBER(6,0),
"LOCATION_ID" NUMBER(4,0)
)
CREATE TABLE "DATA_TARGET"."EMPLOYEES"
(
"EMPLOYEE_ID" NUMBER(6,0),
"FIRST_NAME" VARCHAR2(20 BYTE),
"LAST_NAME" VARCHAR2(25 BYTE) NOT NULL ENABLE,
"EMAIL" VARCHAR2(25 BYTE) NOT NULL ENABLE,
"PHONE_NUMBER" VARCHAR2(20 BYTE),
"HIRE_DATE" DATE NOT NULL ENABLE,
"JOB_ID" VARCHAR2(10 BYTE) NOT NULL ENABLE,
"SALARY" NUMBER(8,2),
"COMMISSION_PCT" NUMBER(2,2),
"MANAGER_ID" NUMBER(6,0),
"DEPARTMENT_ID" NUMBER(4,0)
)
The process of loading xml data to data_target involves creating 3 steps.
1. Create a Procedure in ODI and issue a command to synchronize data from xml to xml_staging schema (Yes. All it needs is a single command to load xml to xml_staging schema)
2. Create interfaces for table to table loading of regions, countries, locations, departments and employees from xml_staging to data_target.
3. Create a package to sequence these objects and run the package.
I have created a new folder XML_TO_TABLE under PRJ_TEST project. All objects we create in this post go inside this folder.
1. Loading XML to XML_STAGING schema
Under xml_to_table folder, right click on procedures and select new procedure. Provide a name and select XML as technology.
Go to details tab and add new step line. Provide a name, select XML technology and select xml logical schema. In the command section provide SYNCHRONIZE FROM FILE and save.
SYNCHRONIZE FROM FILE - This command instructs ODI to load the data from xml file (directory and xml file name defined in toplogy) and synchronize the data to odi_staging schema.
If we need to load new xml files every time, place the xml file with same name as we defined in topology in the same directory we defined toplogy and then run the procedure with this command by selecting the xml logical schema. Boom... xml data will be synchronized to xml_staging.
If we need to load big xml files, external database schema should be used for good performance and debugging of data if needed in the xml jdbc url.
2. Loading from XML_STAGING to Target tables
we need to create interface for regions, countries, locations, departments and employees. The procedure is same for all interfaces. I will show mapping and flow tab for regions and mapping for the interfaces here.
Create regions interface. Provide name
for regions, go to mapping tab, put the xml_staging regions as source and data_target regions as target and do the mapping
In the flow tab, select IKM SQL to Oracle
Lets create interface for countries. In the mapping tab, put xml_staging countries as source and data_target countries as target. I will have introduce a lookup table (green color) since I need to populate the varchar country code (because of country_num i added before). The lookup table is countries from HR schema joined with country name. Lookup tables can be added by selecting the search like icon in the mapping tab above source tables area.
This is the look up table join condition used in countries.
Lets create locations interface. Drop xml_staging location table in source and data_target locations table in target and do the mapping. here also i used data_target countries table we populated in previous step just to populate varchar country_id. The join condition is based on the country_num.
Lets create the departments interface. Drop xml_staging departments table into source and data_target departments table into target and do the mapping in mapping tab.
Lets create the employees interface. Drop xml staging employees into source and data_target employees into target and do the mapping in mapping tab. For the data_hire column, I have used to to_date and substtr functions to convert incoming varchar data into date.
Lets create a package to put everything together. Create a package and put procedure, interfaces of regions, countries, locations, departments and employees in sequence.
Lets run the package and see the results. Package run is successful
Lets check the xml_staging table and target table to see the results. I am just showing employees table from xml_staging and data_target.
With this we have completed the loading xml file to ODI. Please post if you have any questions or suggestions.
Hi ,
ReplyDeleteIs it possible to convert xml to excel in oracle odi...if it is possible pls share me the steps...Thanks
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download Now
Delete>>>>> Download Full
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download LINK
>>>>> Download Now
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download Full
>>>>> Download LINK eV
This comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteExcelent tutorial!
Can you please share the XSD AND XML file? I have some issues of the hierarchy that i want to compare with your files.
Thanks!
when xml file refreshed, the target table does not load refreshed data
ReplyDeleteHi the XML in Part 1 is not accessible can you please provide another link for that?
ReplyDeleteThis is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeleteDevops training in Chennai
Devops training in Bangalore
Devops Online training
Devops training in Pune
This comment has been removed by the author.
ReplyDeleteMerit Casino: A Brand New Way to Login and Win
ReplyDeleteMerit Casino | A Brand New Way to Login and Win · Betting Site Merit Casino · Casino Withdrawal งานออนไลน์ Methods · Login and septcasino Claim Your Casino 메리트카지노 Bonus! · Win
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download Now
ReplyDelete>>>>> Download Full
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download LINK
>>>>> Download Now
Oracle Data Integrator Tutorials: Reading From Xml File In Oracle Data Integrator - Part2 >>>>> Download Full
>>>>> Download LINK
EXCELLENT TUTORIAL
ReplyDeleteLookobeauty
ReplyDeletehttps://lookobeauty.com/makeup-artist-institute-makeup-artist-course-in-gurgaon/
Looking For Best Makeup Artist Course In Gurgaon. Best Makeup Artist Institute With Affordable Fees, Best Placement Record By Top Makeup Teachers In Gurgaon.
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
1W04Y
Yalı
ReplyDeleteBeyazkent
Hisardere
Orhaniye
Karacakaya
NSQ
van
ReplyDeletedüzce
mardin
elazığ
sakarya
W3P5
görüntülü.show
ReplyDeletewhatsapp ücretli show
C5FM0B
goruntulu show
ReplyDeleteücretli
DXGİVQ
https://titandijital.com.tr/
ReplyDeletenevşehir parça eşya taşıma
bolu parça eşya taşıma
batman parça eşya taşıma
bayburt parça eşya taşıma
ZGEO5
kırklareli evden eve nakliyat
ReplyDeleteısparta evden eve nakliyat
istanbul evden eve nakliyat
ankara evden eve nakliyat
kırıkkale evden eve nakliyat
L0XBL
369AF
ReplyDeleteTunceli Parça Eşya Taşıma
Bartın Parça Eşya Taşıma
İzmir Parça Eşya Taşıma
Hatay Parça Eşya Taşıma
Iğdır Evden Eve Nakliyat
272DC
ReplyDeletesarms
order testosterone propionat
turinabol for sale
Edirne Evden Eve Nakliyat
Konya Evden Eve Nakliyat
Bayburt Evden Eve Nakliyat
testosterone propionat
Antep Evden Eve Nakliyat
order peptides
56174
ReplyDeleteAksaray Evden Eve Nakliyat
Trabzon Evden Eve Nakliyat
Osmaniye Şehir İçi Nakliyat
Zonguldak Şehirler Arası Nakliyat
Bingöl Parça Eşya Taşıma
Edirne Parça Eşya Taşıma
Rize Evden Eve Nakliyat
Batman Parça Eşya Taşıma
İstanbul Şehir İçi Nakliyat
BF5DF
ReplyDeleteÇerkezköy Ekspertiz
Yalova Parça Eşya Taşıma
Kripto Para Borsaları
Urfa Lojistik
Bitfinex Güvenilir mi
Burdur Evden Eve Nakliyat
Ankara Şehir İçi Nakliyat
Kırklareli Şehirler Arası Nakliyat
Bilecik Parça Eşya Taşıma
A60B5
ReplyDeleteBatıkent Fayans Ustası
Çorum Lojistik
Tekirdağ Fayans Ustası
Ankara Parke Ustası
Niğde Şehirler Arası Nakliyat
Kırıkkale Parça Eşya Taşıma
Antep Şehir İçi Nakliyat
Muğla Şehir İçi Nakliyat
Çerkezköy Cam Balkon
8949D
ReplyDeletebuy parabolan
buy sarms
turinabol for sale
Urfa Evden Eve Nakliyat
Silivri Evden Eve Nakliyat
https://steroidsbuy.net/steroids/
buy steroids
for sale dianabol methandienone
Erzurum Evden Eve Nakliyat
82262
ReplyDeleteÇanakkale Şehir İçi Nakliyat
Düzce Parça Eşya Taşıma
Rize Parça Eşya Taşıma
Kocaeli Evden Eve Nakliyat
Tunceli Lojistik
Bayburt Şehirler Arası Nakliyat
Kırklareli Parça Eşya Taşıma
Mexc Güvenilir mi
Eryaman Fayans Ustası
ADE9E
ReplyDeleteÇorlu Lojistik
Kastamonu Evden Eve Nakliyat
Mardin Şehir İçi Nakliyat
Muş Şehirler Arası Nakliyat
Çanakkale Şehir İçi Nakliyat
Yalova Evden Eve Nakliyat
Kayseri Evden Eve Nakliyat
Isparta Parça Eşya Taşıma
Nexa Coin Hangi Borsada
8E0D0
ReplyDeleteBinance Referans Kodu
Urfa Lojistik
Tokat Evden Eve Nakliyat
Kütahya Parça Eşya Taşıma
Düzce Şehir İçi Nakliyat
Ankara Şehirler Arası Nakliyat
Kütahya Şehir İçi Nakliyat
Şırnak Şehirler Arası Nakliyat
Nexa Coin Hangi Borsada
B4A6D
ReplyDeletebinance %20
D9734
ReplyDeleteindirim kodu %20
39E85
ReplyDeleteşırnak en iyi sesli sohbet uygulamaları
sinop rastgele sohbet siteleri
yozgat en iyi görüntülü sohbet uygulaması
agri en iyi sesli sohbet uygulamaları
kayseri sesli mobil sohbet
bolu canlı sohbet bedava
yabancı görüntülü sohbet uygulamaları
hakkari ücretsiz sohbet uygulaması
van canli sohbet
909BD
ReplyDeletegörüntülü sohbet
bitlis görüntülü sohbet uygulama
yabancı sohbet
tunceli mobil sohbet sitesi
bingöl chat sohbet
osmaniye sesli sohbet uygulamaları
nevşehir canlı görüntülü sohbet siteleri
mersin telefonda sohbet
sivas bedava sohbet
CEA8E
ReplyDeletemardin sesli sohbet sitesi
Sinop Telefonda Görüntülü Sohbet
mersin canlı sohbet siteleri ücretsiz
Trabzon Mobil Sesli Sohbet
Sakarya Sesli Sohbet Uygulamaları
bedava sohbet siteleri
elazığ yabancı canlı sohbet
bedava görüntülü sohbet
adana görüntülü canlı sohbet
93BED
ReplyDeleteerzurum canli sohbet bedava
mobil sohbet odaları
balıkesir canlı sohbet bedava
adıyaman mobil sohbet odaları
Adıyaman Sesli Görüntülü Sohbet
Sakarya Mobil Sesli Sohbet
karabük en iyi ücretsiz sohbet siteleri
mobil sohbet et
Aksaray Telefonda Sohbet
B70A2
ReplyDeletekırıkkale rastgele sohbet uygulaması
en iyi ücretsiz görüntülü sohbet siteleri
trabzon kadınlarla sohbet et
kızlarla canlı sohbet
kütahya telefonda sohbet
Çanakkale Mobil Sohbet Siteleri
igdir bedava görüntülü sohbet sitesi
zonguldak nanytoo sohbet
artvin kadınlarla görüntülü sohbet