Loading the relational data from XML to tables through OWB
Hi,
Please help me to load XML my mapping it through OWB in oracle 11g.
I can do it through pl/sql,but nees to be done using OWB and I don't know OWB.
Please suggest by example.
Thanks in Advance !!!
Hi
Please follow below steps for creating module(repository owner) and
1. login design center thru repository owner ( start--> Oracle - OUIHome1 --> Warehouse Builder -- Design Center)
2. Under your project (Ex : MY_PROJECT) , create new module and crete new location and register that location
Note : enter repository owner user and password
3. Expand your repostory owner module and expand transformations and right click and select import
now follow my eariler steps :
2. Import WB_XML_LOAD procedure . and exit to repository owner.
3. connect to owb design center through your repository user (ex : REP_USER)
Create New mapping and drag one Constant Operator and create one attribute, paste / edit following code
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>E:\SOURCE\emp.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target truncateFirst = "FALSE" dateFormat="yyyy.MM.dd">rep_user.emp</target>'||
'</targets>'||
'</OWBXMLRuntime>'
4. Drag pre mapping operator and select WB_XML_LOAD procedure
5. Connect Constant Operator attribute to pre mapping operator.
6. Drag two dummy tables and connect source to target. (ex : drag t1 (table) tab two times and connect.
7. Validate and deploy the mapping.
8. grant necessary grant command to rep_owner user to rep_user user.
(Note : target truncateFirst = "FALSE" by default truncate the table. So you have to give grant privileges
To rep_user , select ,insert, delete privileges.
9. Execute the mapping , and check EMP table. (Note : before loading EMP table delete all records ).
10 . If you want more description please go through the below link
http://download.oracle.com/docs/html/A95931_01/apf.htm
Regards
Venkat
Similar Messages
-
Error While Loading the Master Data from R3
Hi Gurus,
I am loading the masterdata from R3.I have enhanced the Datasource .In that datasource there is a field DATUB ( Valid To Date).For this field I have wriiten the User Exit at the R3 side.Now I am loading the data in BW.But I am not getting the values for DATUB field in the BW, though they are there at the R3 side.
I have done following to analyse the issue.
1.Have checked the datasource at the R3 from RSA3.Its populating the field DATUB correctly.
2.Have deleted the whole masterdata and tried to load again.But no success.
3.Have tried to load the data for the perticular Bill of Material(BOM).Then it get loaded correctly along with the value of DATUB.But when i tried loading the entire data i am not getting the field DATUB populated.
Please help me out.Its urgent.
Thanks.
ShalakaHello,
I finally got the solution to my problem.
If you append a field to generic datsource then you should check the tick in datasource for "field only". Or else you would not get the values handed over to BW.
Please check following link for more details about this "field only" setting for Generic datasources.
http://help.sap.com/saphelp_tm70/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
Regards,
Anuj -
How to fetch the relational data from the xml file registered in xdb
Hi,
I have to register the xml file into the xdb repository and i have to fetch the data of the xml file as relational structure through the select statement .
i used the below query to register the xml file in xdb.
DECLARE
v_return BOOLEAN;
BEGIN
v_return := DBMS_XDB.CREATERESOURCE(
abspath => '/public/demo/xml/db_objects.xml',
data => BFILENAME('XML_DIR', 'db_objects.xml')
COMMIT;
END;
Now i have to fetch the values in the xml file as relational data .
whether it is possible ?
can any one help me.
Regards,
suresh.When you transform your XMLdata to a xmltype you can do something like this for example:
select
extractvalue(value(p),'/XMLRecord/Session_Id') session_id,
extractvalue(value(p),'/XMLRecord/StatementId') StatementId,
extractvalue(value(p),'/XMLRecord/EntryId') EntryId
from
table(xmlsequence(extract(xmltype('
<XMLdemo>
<FormatModifiers><FormatModifier>UTFEncoding</FormatModifier></FormatModifiers>
<XMLRecord>
<Session_Id>117715</Session_Id>
<StatementId>6</StatementId>
<EntryId>1</EntryId>
</XMLRecord>
</XMLdemo>
'),'/XMLdemo/*'))) p
where extractvalue(value(p),'/XMLRecord/Session_Id') is not null;
For this sample I've put a readable XML in plain text and convert it to xmltype so you can run it on your own database. -
How to load the existing data from the databse in the CMP entity bean?
hello
my problem is as follows--
i am creating a CMP entity bean.in these beans client create the data instances using create() function.
now a entity bean will be created for the newly created data and it's EJBObject will also be formed.
now we will be able to perform finder methods over them.
remember these data has been newly created in the database.
but now if i want to perform the finder methods on the
existing data in the database( i don't need to use create() fn as i am not "creating" the data.). how will i perform the query over the existing data.
basically i have to make a CMP bean to extract the data corresponding to a particular condition , from the database table. i don't want to create the data in the database but just find out what data satisfies my condition.
thanking you
Prashantyou have to use findByXXX methods. depending on your appserver you may have to declare them (and eventually the query you want to be used) in the vendor specific deploiement descriptor.
(e.g. using jboss i don't remember having explicitly declare the findBySomeField method - where someField is a persistent field - in the dd, whereas with bas all finder methods have to be explicitly declared)
[note that obviously these methods have to be present in your home interface] -
Updating all the changed data from Vo based table into database
hi,
there is a advanced table in my page and there r 14columns in it. the data for this columns is coming from 8 different tables. here the table is VO(sql query) based table.there is also a apply button on the page. when i click "apply" which is submit button, i want all the changes made on the advanced table to be captured and get updated on the respective columns in the database..
can anyone helpme out in doing this.
Thanks
ChanduSQL query based VO is not updatable. You have to base your ViewObject for all EntityObjects which represent your 8 different tables.
Its good practice to base all your VO on EO, even for read-only, unless your query does not contain, distinct, union & group by clause.
Setting "updatable=false" property of EO make behavior of read-only.
Is your VO based on EO?
See this- http://howtolearnadf.blogspot.com/2012/04/how-to-create-oracle-adf-view-object.html
http://weblog.singhpora.com/2010/02/read-only-view-object-also-be-based-on.html -
Unexpected results getting data from two fact tables through conformed dim
Hi all,
We are getting an unexpected behaviour in our OBIEE 10.1.3.3.3. We have this scenario:
We have {color:#0000ff}2 fact tables{color}{color:#000000} called F1 and F2. F1 has one measure, f1m1 and F2 has another one, f2m1.
We have {color:#0000ff}4 conformed dimensions{color}, called D1, D2, D3, Date.
When we are requesting for individual fact tables, we are getting:
date d1 d2 d3 f1m1
dt1 - x - y - z - m1
dt1 - x - y - z' - m2
date d1 d2 d3 f2m1
dt1 - x - y - z - m3
dt1 - x - y - z'' - m4
But, trying to obtain a compare scenario, we are getting
date d1 d2 d3 f1m1 f2m1
dt1 x y z m1 m4
Instead of
date d1 d2 d3 f1m1 f2m1
dt1 x y z m1 m3
Looking at query log, we have catched the reason. That's why BI Server is using to solve this request using ROW_COUNT() to join SAWITH0 and SAWITH1 in SAWITH2 result set. So, the order may not be the same in the results sets in every fact table. More or less, generated query is like:
WITH
SAWITH0 AS
(select ....
from F1),
SAWITH1 AS
(select ...
from F2),
SAWITH2 AS
select from (select ...
ROW_NUMBER() OVER PARTITION (....) c10
from SAWITH0.d1 full outer join SAWITH1.d1 ....) D1
{color:#ff0000}where (D1.c10 = 1){color}
select SAWITH2. ....
from SAWITH2
order by c1..c10
The problems seems to be that BI server is ordering the result sets SAWITH0 and SAWITH1 and getting row number to join this results sets, but this is not getting the correct result.
Any ideas?
TIA
Javier
{color}
Edited by: jirazazábal on Mar 13, 2009 2:46 PMI have done a logical fact table with two fact table source on it.
The Sql performed against the database was this one.
-------------------- Sending query to database named PRODS_AIX (id: <<153418>>):
WITH
SAWITH0 AS (select sum(T21296.CONSUMERS_SALES_EURO) as c1,
T21309.DIVISION_CODE as c2
from
DIVISION T21309,
C_CONSUMERS_SALES T21296
where ( T21296.DIVISION = T21309.DIMENSION_KEY )
group by T21309.DIVISION_CODE),
SAWITH1 AS (select sum(T21356.ORDER_VALUE) as c1,
T21309.DIVISION_CODE as c2
from
DIVISION T21309,
DWH_SALES_ORDER_OVERVIEW T21356
where ( T21309.DIMENSION_KEY = T21356.DIVISION_KEY )
group by T21309.DIVISION_CODE)
select distinct case when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c2 is not null then SAWITH1.c2 end as c1,
SAWITH0.c1 as c2,
SAWITH1.c1 as c3
from
SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c2 , 'q') = nvl(SAWITH1.c2 , 'q') and nvl(SAWITH0.c2 , 'z') = nvl(SAWITH1.c2 , 'z')
order by c1As you can see one select (SAWITH0) for the first fact table C_CONSUMERS_SALES and one select for the second fact table DWH_SALES_ORDER_OVERVIEW (SAWITH1 ) and the two statement are joined with a full outer join.
I ask me why you have the three select (SAWITH0,SAWITH1 and SAWITH2). Can you please paste the complete SQL performed ?
Can you tell us also which SQL is performed if you select only the columns from one fact table and not for the other ?
Regards
Nico
http://gerardnico.com -
How to get the measurement data from IMU using SBRIO through SPI?
Hi All,
I’am trying to use the SPI communication protocol to realize the bridge between my Vectornav VN100 IMU chip and the LABView through the SBRIO 9602. I amended the SPI sample code from NI website based on my own device and configuration. It compiled and ran well. The problem is the IMU we are using need a 16 bytes command and it will give back a response containing the measurement data. But it seems that with the code I have, I can only send an at most 32 bits command once. Hope anyone who has experience in IMU implementation on LABView could give me some help! Thanks a lot!
NickKyle,
Thank you very much!
I attached the amended program and the Manual Sheet of the IMU I am using.
Since I only need to one port, I just amended the configuration for port 1 and adjusted the code for my device.
I think the problem exist in the data sending mechanism, you can check the requirement out in P12 and P13 of the manual sheet.
Best Regards!
Nick
Attachments:
Vectornav VN100.pdf 1774 KB
spi_dual_port_example.zip 755 KB -
Fetch 1-n relation data from XML Data using XMLTable
Dear All,
Following query is running fine.
with t as (select XMLType('<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/>
<env:Body>
<nm:CustomerCRMByIDResponse xmlns:nm="http://sap.com/xi/CRM/Global2" xmlns:prx="urn:sap.com:proxy:DCT:/1SAI/TAS57DF0B317943DEAE3C49:702">
<MessageHeader/>
<BusinessPartner>
<InternalID>2200117598</InternalID>
<AddressInformation>
<UUID>51471396-9ae8-3cc0-e100-80000a031a28</UUID>
<DefaultIndicator>true</DefaultIndicator>
<Address>
<PostalAddress>
<CountryCode>DE</CountryCode>
<CountryName>Country Name</CountryName>
</PostalAddress>
<Telephone>
<Number>
<SubscriberID>0711/123456</SubscriberID>
<ExtensionID>0</ExtensionID>
<CountryCode>DE</CountryCode>
<CountryDiallingCode>+49</CountryDiallingCode>
<CountryName languageCode="de">Country Name</CountryName>
</Number>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<MobilePhoneNumberIndicator>false</MobilePhoneNumberIndicator>
<SMSEnabledIndicator>false</SMSEnabledIndicator>
<DefaultIndicator>true</DefaultIndicator>
</Telephone>
<Telephone>
<Number>
<SubscriberID>0711/999999</SubscriberID>
<CountryCode>DE</CountryCode>
<CountryDiallingCode>+49</CountryDiallingCode>
<CountryName languageCode="de">Country Name</CountryName>
</Number>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<MobilePhoneNumberIndicator>true</MobilePhoneNumberIndicator>
<SMSEnabledIndicator>true</SMSEnabledIndicator>
<DefaultIndicator>false</DefaultIndicator>
</Telephone>
<Facsimile>
<Number>
<SubscriberID>0711/999888</SubscriberID>
<ExtensionID>99</ExtensionID>
<CountryCode>DE</CountryCode>
<CountryDiallingCode>+49</CountryDiallingCode>
<CountryName languageCode="de">Country Name</CountryName>
</Number>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<DefaultIndicator>true</DefaultIndicator>
</Facsimile>
<EMail>
<URI>[email protected]</URI>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<DefaultIndicator>true</DefaultIndicator>
</EMail>
<EMail>
<URI>[email protected]</URI>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<DefaultIndicator>false</DefaultIndicator>
</EMail>
<Web>
<URI>www.xyz.com</URI>
<UsageDeniedIndicator>false</UsageDeniedIndicator>
<DefaultIndicator>true</DefaultIndicator>
</Web>
</Address>
</AddressInformation>
<AddressInformation>
<UUID>514a519b-39a2-4890-e100-80000a031a28</UUID>
<DefaultIndicator>false</DefaultIndicator>
<Address>
<PostalAddress>
<CountryCode>AT</CountryCode>
<CountryName>Österreich</CountryName>
</PostalAddress>
</Address>
</AddressInformation>
</BusinessPartner>
</nm:CustomerCRMByIDResponse>
</env:Body>
</env:Envelope>') xml_data from dual)
SELECT xmlresponse.*
FROM t, XMLTable(Xmlnamespaces('http://www.w3.org/2003/05/soap-envelope' AS "env",
'http://sap.com/xi/CRM/Global2' AS "nm",
'urn:sap.com:proxy:DCT:/1SAI/TAS57DF0B317943DEAE3C49:702' AS "prx"
'for $BusinessPartner in /env:Envelope/env:Body/nm:CustomerCRMByIDResponse/BusinessPartner
return $BusinessPartner'
PASSING xml_data
COLUMNS
Internalid Varchar2(4000) Path 'InternalID'
) xmlresponse;As you can see, one "BusinessPartner" can have multiple "AddressInformation"
and one "AddressInformation" can have multiple "Telephone".
Can someone suggest me how can I extract both InternalID & UUID in one query? For above example output should look as follows..
InternalID UUID
2200117598 51471396-9ae8-3cc0-e100-80000a031a28
2200117598 514a519b-39a2-4890-e100-80000a031a28Thank you very much in advance.
Regards,
HariHere is a basic example of one method to achieve what you need
SELECT xmlresponse.Internalid, xml2.uuid
FROM t,
XMLTable(Xmlnamespaces('http://www.w3.org/2003/05/soap-envelope' AS "env",
'http://sap.com/xi/CRM/Global2' AS "nm"
'/env:Envelope/env:Body/nm:CustomerCRMByIDResponse/BusinessPartner'
PASSING xml_data
COLUMNS
Internalid Varchar2(20) Path 'InternalID',
addrinfoxml XMLType PATH 'AddressInformation'
) xmlresponse,
XMLTable('/AddressInformation'
PASSING xmlresponse.addrinfoxml
COLUMNS
UUID Varchar2(80) Path 'UUID'
) xml2;Changes:
I removed one of namespaces as you only need to include those included in an XPath statement.
I shortened your datatypes.
I went for the simple XMLTable joined to an XMLTable approach, instead of a single XMLTable using a FLWOR statement.
You can include the addrinfoxml column to your SELECT list to see the data being passed between the two if you want.
Addition:
Here's one approach for a single XMLTable.
SELECT xmlresponse.*
FROM t,
XMLTable(Xmlnamespaces('http://www.w3.org/2003/05/soap-envelope' AS "env",
'http://sap.com/xi/CRM/Global2' AS "nm"
'for $BP in /env:Envelope/env:Body/nm:CustomerCRMByIDResponse/BusinessPartner
for $ai in $BP /AddressInformation
return <e>{$BP/InternalID}{$ai/UUID}</e>'
PASSING xml_data
COLUMNS
Internalid Varchar2(20) Path 'InternalID',
UUID Varchar2(80) Path 'UUID'
) xmlresponse;Edited by: A_Non on Mar 25, 2013 9:41 AM
Added in XQuery solution -
Error when loading the master data
Hi all,
Can anybody help me out. I am loading the master data from DB Connect source. When i am trying to load it it is giving the runtime error PERFORM_CONFLICT_TAB_TYPE. Can anybody tell me what could be the problem & necessery steps to take.
Thanks in advance.
Regards,
Shaik.Hi,
Please go through the following threads:
PERFORM_CONFLICT_TAB_TYPE shortdump during data loading into ODS
Perform_conflict_tab_type error
PERFORM_CONFLICT_TAB_TYPE error-Urgent!!
Next time you might want to just search the forum first... lots of surprises!
Hope this helps,
Cheers,
Gimmo -
How to load the exist Data Mart Request in to cube.
Hi Friends,
I have a scenario... i got DSO and one Cube , iam loading the data from DSO to Cube .
The number of records are more in the DSO and due to some clculation in the routine i need to load the data year by year(i got 2007 and 2008 year daya). I have loaded the 2007 data to the Infocube and in the DSO i can see the Data Mart Symbal against the Request Id when th load is finished successfully.
When iam trying to load the 2008 data from DSO to Cube iam getting the "0" records. I realised that the Data Mart symbal is exist in the DSO.
How to load the 2008 data in this scenario. If i delete the data mart sysbel means iam deleting the Cube request.
Can any have an idea on this.
Thaks in advance.HI,
Things are not clear.
How is loading happening if its delta or full load through DTP or you using 3.5 flow??
In any cases if you do a full load or full repair based on the year selection it should pick the records from the source...there is nothing to do with the data mart status in the case of full loads.
Data mart status will come into picture only when you schedule the delta loads.
Do a full load based on selections on year from the DSO to the cube...no need to delete the data mart or it will bring that request again delta is scheduled...does that request in DSO contains the data for 2008 only ...if yes then you can just delete the data mart status for that and do a delta...if not then do full loads as said.
Thanks
Ajeet -
How to insert the data from XML to a table
Hi,
I'm using Oracle 10g Express Edition
I need help in How to insert the data from XML file into the table.
Below is the example i'm working on..
I have create ridb user with below mentioned privileges:
Account Status Locked Unlocked
Default Tablespace: USERS
Temporary Tablespace: TEMP
User Privileges :
Roles:
CONNECT
RESOURCE
Direct Grant System Privileges:
CREATE DATABASE LINK
CREATE MATERIALIZED VIEW
CREATE PROCEDURE
CREATE PUBLIC SYNONYM
CREATE ROLE
CREATE SEQUENCE
CREATE SYNONYM
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
CREATE VIEW
& table is created TRIALZIPCODES below mentioned is the DDL:
CREATE TABLE TRIALZIPCODES
STATE_ABBR VARCHAR2(20) NOT NULL
, ZIP_CODE NUMBER(10, 0) NOT NULL
, ZIP_CODE_EXT VARCHAR2(20)
Below is the XML FILE: which is stored in C:\OracleProject Folder
File name: trial.xml
<?xml version="1.0" ?>
<metadata>
- <Zipcodes>
- <mappings Record="4">
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>94301</ZIPCODE>
</mappings>
- <mappings Record="5">
<STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
<ZIPCODE>80323</ZIPCODE>
<ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
</mappings>
</Zipcodes>
</metadata>
PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
create or replace
PROCEDURE TRIAL AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
begin
-- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
-- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
-- the name of the table as specified in our DTD
DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
-- the name of the data set as specified in our DTD
DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
-- for getting the output on the screen
dbms_output.enable(1000000);
-- open the XML document in read only mode
v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
loop
BEGIN
utl_file.get_line(v_FileHandle, charString);
exception
when no_data_found then
utl_file.fclose(v_FileHandle);
exit;
END;
dbms_output.put_line(charString);
if finalStr is not null then
finalStr := finalStr || charString;
else
finalStr := charString;
end if;
end loop;
-- for inserting the XML data into the table
insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
DBMS_XMLStore.closeContext(insCtx);
END;
END TRIAL;
For the first time when i complied i got the errors as :
Procedure RIDB.PROCEDURE1@RIDB
Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
Error(16,14): PL/SQL: Item ignored
Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
Error(29,1): PL/SQL: Statement ignored
Error(33,1): PL/SQL: Statement ignored
Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
Error(36,1): PL/SQL: Statement ignored
Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
SQL Statement:
grant execute on utl_file to ridb
So, it got compiled successfully but when i execute it gives me error as:
Source does not have a runnable target.
What does this mean?
So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
So can i edit the init.ora with notepad.When i tried to do that it says permission denied
In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
but there is also other file initXETemp in the same path do i need to do the changes in it.
I have tried even editing the SPFILE as mentioned below:
C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
So i had reinstall the software again.
Could you please let me know how to proceed..hi,
I have created the directory from sys database
CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
& grant read,write access to the user
grant read,write on directory XML_DIR2 to RIDB;
& i had change the tag name in the xml file as shown below:
<?xml version = '1.0'?>
<metadata>
<Zipcodes>
<mappings Record="4">
<STABBRE>CA</STABBRE>
<ZIPCODE>94301</ZIPCODE>
</mappings>
<mappings Record="5">
<STABBRE>CO</STABBRE>
<ZIPCODE>80323</ZIPCODE>
<ZIPCODEEXT>9277</ZIPCODEEXT>
</mappings>
</Zipcodes>
</metadata>
TRIALZIPCODE table as shown below:
CREATE TABLE "RIDB"."TRIALZIPCODE"
( "STABBRE" VARCHAR2(20 BYTE),
"ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
"ZIPCODEEXT" NUMBER
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
I have tried two methods as shown below:
Procedure 1:
create or replace
PROCEDURE TRIAL_V2 AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
cnt NUMBER;
xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
--XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
BEGIN
insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
DBMS_XMLStore.setRowTag(insCtx, 'mappings');
cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
DBMS_XMLStore.closeContext(insCtx);
END;
Procedure 1 was compiled with out errors but when i execute i got the error as :
Source does not have a runnable target.
Procedure 2_
CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
cnt NUMBER;
xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
--XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
BEGIN
INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
extractvalue(x.column_value, 'mappings/ZIPCODE'),
extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
FROM TABLE(
XMLSequence(
EXTRACT(
xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
'metadata/Zipcodes/mappings'
) x
END;
END TRIAL_V3;
Procedure 2 was complied without errors but when i execute i got the error as:
Connecting to the database RIDB.
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the file specified.
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at "SYS.XMLTYPE", line 287
ORA-06512: at "RIDB.TRIAL_V3", line 12
ORA-06512: at line 2
Process exited.
Disconnecting from the database RIDB.
Could you please let me know how to proceed... -
How to extract data from xml and insert into Oracle table
Hi,
I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
I need to extract the values of these columns and insert into the table
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>Re: Insert from XML to relational table
http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta= -
AWM dimension mapping - is it possible to load data from two input tables ?
Hello All
I have two tables ProductFamily (parent level) and Products (child level).
I want to load a dimension from these two tables where the parent-child relationships are maintained (I am using AWM).
I created a mapping with these two tables as input, but the data loaded does not maintain the relationships.
So how do I do that? Is it possible to load dimensions where different levels get data from multiple tables?
Is there any type of joiner available in AWM?
thanks
Few Notes:
- I do not want to use OWB here as my data is clean
- In AWM, When I loaded the data from a single view which contained data from both input tables, it worked fine. But this is my worst case option.You should use the Snowflake Dimension option in the Dimension mapping screen for the Product Dimension (as opposed to the default dimension mapping style - star schema).
This will modify the mapping inputs to include a separate parent level key for each hierarchy/level i.e. for each hierarchy/level (unless topmost level of hierarchy), you need to specify the parent level key in addition to the current level key, code/name/description/other attributes etc.
You can do the mapping in either .... use icons at the top of the mapping screen.
the drag/drop mode by dragging the relational column onto dimension model - hierarchy/level/attribute
-or-
the table expression mapping mode which gives the same effect.. dragging a column onto an attribute sets the expression in <schema>.<table>.<column> format.
HTH
Shankar
Note1: Complete the mapping in one go.. Switching b/w the mapping modes cause the mappings to be reset.
Note2: Assume your data is correct, foreign key to parent level table: ProductFamily exists in child level table: Products. -
How to read the data from XML file and insert into oracle DB
Hi All,
I have below require ment.
I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
Many Thanks.Sounds a lot like this question, only with less details.
how to read data from XML variable and insert into table variable
We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us. Plenty of examples abound on the forums that cover the topics you seek as well. -
How to fetch data from XML and store it in internal table
Hi All,
Can anyone help me out, in fetching data from xml and store it in an internal table. Is there any standard function module is there?
Regards,
Karthickto do this you can either develop a XSLT program and use it with CALL TRNSFORMATION key word to tranform the XML into itab .
(search the ABAP General forum, i have posted few samples)
or simply use the following FM which converts your XML into a itab of name value pair (name would holw the element name and value would hold the value of the element) which you can then loop and read it to your itb.
data: xmldata type xstring .
data: result_xml type standard table of smum_xmltb .
data: return type standard table of bapiret2 .
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
xml_input = xmldata
TABLES
xml_table = result_xml
return = return .
Regards
Raja
Maybe you are looking for
-
How come i cant autopopulate my email addresses, i need to type in all over again
I use Network solutions and they upgraded my email system and I can get the addresses in my contact sheet if I add them but now when I type in an email address and I retype another email it won't autopopulate. It drives me crazy to retype a long emai
-
Recently I've lost the ability to use the options available with a right click on a bookmark in the main menu bookmarks. I can't move them around up or down, can't delete any either. The weird thing is in assorted bookmarks I'm having no problems at
-
Multiple Displays: New app windows not opening on current display
Does anyone have a suggestion or information for me on this one? Here's the story: I have a brandy-new 15" MBP Retina. All kinds of snazziness! I also picked up a MDP Apple Cinema Display at the same time. Why MDP instead of Thunderbolt you ask? Beca
-
Compactrio not on RT target access list
I can access my compactRIO as an FPGA target, but when I input the IP address under RT target, it comes up with access denied
-
No sound on imac with windows 7 running boot camp
no sound on imac with windows 7 running boot camp