How to parse/extract XML from clob field using ODI

Hi,
I am very new to ODI. I have an oracle table which has clob field. This clob field contains xml. I would like to parse this xml and convert it to oracle table. Means I would like to make all the tags of xml as oracle table columns.
I have created a PL/SQL procedure and used XMLTABLE function and I have achieved my goal. The same this I am trying to do with ODI. Since I am new to ODI so any help is appreciated.
Thanks

In 9.2, you are limited into your options. Have a look into, among others, updateXML. Updating tp 10gR2 will give you more options to succeed.

Similar Messages

  • Parse XML from CLOB field

    How can I parse XML from CLOB field? I need to replace or delete the node from XML document and update the database with new XML. I am using Oracle 9i release 2.
    Here is the XML. In this XML if section1 and section2 exists then I need to delete the section1 node. If section2 doesn't exist, replace section1 with section2 node.
    <Document ID='2' TypeID='2'>
    <Body>
    <Page Name='Page1'>
    <Sec ID='section1' Title='Section 1' GroupID='' />
    <Sec ID='section2' Title='Section 2' GroupID='' />
    </Page>
    </Body>
    </Document>
    Please help.. Thank you..

    In 9.2, you are limited into your options. Have a look into, among others, updateXML. Updating tp 10gR2 will give you more options to succeed.

  • How do I extract pages from a pdf using 'Adobe PDF Pack'?

    How do I extract pages from a pdf using 'Adobe PDF Pack'?

    I think you have to buy extractor for 1.99 a month to extract PDF.  But I am having trouble activating it.  Good luck.

  • Extracting xmldata from clob field in oracle

    I have an xml document stored in xmltype (clob)field in oracle
    Below is the xml data inside the xml ( I have kind of 300 elements similar to this inside the xml)
    <ns1:E-I12_IS_13 ObjID="I12" ObjType="e">5437090</ns1:E-I12_IS_13>
    <ns1:E-I13_IS_14 ObjID="I13" ObjType="e">5</ns1:E-I13_IS_14>
    <ns1:E-I14_IS_15 ObjID="I14" ObjType="e">9</ns1:E-I14_IS_15>
    The requirement is to get all the elements from the xmldata and compare against the 15-16 oracle tables ( here xml is converted and stored in these tables by a tibco process)
    select dbms_lob.instr(clobcolumnname,'E-I13_IS_14') from tablename  where  ( given condition to extract specific transaction)
    the above statement gives me position of the string
    select dbms_lob.substr(clobcolumnname,6( length of element value),870(position from where the value starts)) from tablename where  condition
    the abv statement gives me the element value
    but I want to extract the value for  any element by giving the element name ( if u see any value comes after objtype="e"  between > and < tags)
    can anyone on this forum tell me to extract the element value just by giving element name ( since I have to do the same for n number of elements - how to find position of > and < tags??)

    Hi Odie,
    Good afternoon. I am not getting any help to solve my xmltable issues.
    <MeterTransaction xmlns:CorralClub="http://webservice.hlsr.net/CorralClubService/">
      <TransactionID>1100</TransactionID>
      <Club_Number>CN001</Club_Number>
      <Club_Activity_ID>0</Club_Activity_ID>
      <Transaction_Date>2014-01-29T00:00:00-06:00</Transaction_Date>
      <Creation_Date>2014-01-29T00:00:00-06:00</Creation_Date>
      <User_ID>1766</User_ID>
      <Status />
      <TicketCount>0</TicketCount>
      <Usage>0</Usage>
      <BadPulls>0</BadPulls>
      <Discrepancy>0</Discrepancy>
      <Percent>0</Percent>
      <Comments />
      <Readings>
         ********** Can be disregarded ******************
            <xs:schema id="ClubMeter" targetNamespace="http://tempuri.org/ClubMeter.xsd" xmlns:mstns="http://tempuri.org/ClubMeter.xsd" xmlns="http://tempuri.org/ClubMeter.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-               com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
                        ****** Some other elements
              </xs:schema>
          *********** End of Can be disregarded ******************
        <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
          <ClubMeter xmlns="http://tempuri.org/ClubMeter.xsd">
            <MeterBar diffgr:id="MeterBar1" msdata:rowOrder="0" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <TicketCount>111</TicketCount>
              <Usage>88</Usage>
              <BadPulls>15</BadPulls>
              <Discrepancy>8</Discrepancy>
              <Percent>0.0720720720720721</Percent>
              <DISPLAY>BEER - BBS01</DISPLAY>
            </MeterBar>
            <MeterBar diffgr:id="MeterBar2" msdata:rowOrder="1" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <DISPLAY>BEER - BBS02</DISPLAY>
            </MeterBar>
            <MeterReading diffgr:id="MeterReading16" msdata:rowOrder="15" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
              <Open>6</Open>
              <Add1>11</Add1>
              <Close>1</Close>
              <Usage>16</Usage>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading96" msdata:rowOrder="95" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
              <Open>6</Open>
              <Add1>2</Add1>
              <Close>1</Close>
              <BadPulls>3</BadPulls>
              <Usage>4</Usage>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading17" msdata:rowOrder="16" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading97" msdata:rowOrder="96" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
          </ClubMeter>
          <diffgr:before>
            <MeterBar xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterBar1" msdata:rowOrder="0">
              <Bar_Number>BBS01</Bar_Number>
              <DISPLAY>BEER - BBS01</DISPLAY>
            </MeterBar>
            <MeterBar xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterBar2" msdata:rowOrder="1">
              <Bar_Number>BBS02</Bar_Number>
              <DISPLAY>BEER - BBS02</DISPLAY>
            </MeterBar>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading16" msdata:rowOrder="15">
              <Bar_Number>BBS01</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading96" msdata:rowOrder="95">
              <Bar_Number>BBS01</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading17" msdata:rowOrder="16">
              <Bar_Number>BBS02</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading97" msdata:rowOrder="96">
              <Bar_Number>BBS02</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
          </diffgr:before>
        </diffgr:diffgram>
      </Readings>
    </MeterTransaction>
    From the above abbreviated XML document, how do I get the values from the nodes of MeterBar and MeterReading nodes?
    I really appreciate your help in this regard.
    Thanks,
    Bidhan

  • How can I extract XML from a text document?

    I have tons of text documents containing useless text and a section of XML. I would like to use either Mac Automator or Apple Script to pull the XML section out and place it in a new document with a .xml extension. How can I do that?
    Here is a sample of the XML section that I need to pull:
    - ---Start ACNS XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Infringement xsi:schemaLocation="http://www.movielabs.com/ACNS/ACNS2v1.xsd" xmlns="http://www.movielabs.com/ACNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">           <Case>
    <ID>22242387629</ID>
    <Status>OPEN</Status>
    <Severity>Normal</Severity>
    </Case>
    <Complainant>
    <Entity>MPAA Search and Notify</Entity>
    <Contact></Contact>
    <Address></Address>
    <Phone>5555555555</Phone>
    <Email>[email protected]</Email>
    </Complainant>
    <Service_Provider>
    <Entity>Some Place, Somewhere</Entity>
    <Contact></Contact>
    <Address>Some Place, Somewhere  </Address>
    <Phone></Phone>
    <Email>[email protected]</Email>
    </Service_Provider>
    <Source>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <IP_Address>127.0.0.1</IP_Address>
    <Port>64153</Port>
    <Type>P2P</Type>
    <SubType BaseType="P2P" Protocol="BitTorrent" />
    <UserName></UserName>
    <Number_Files>1</Number_Files>
    </Source>
    <Content>
    <Item>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <AlsoSeen Start="2011-12-02T23:40:00.11Z" End="2011-12-02T23:41:59.94Z"></AlsoSeen>
    <Title>asdfasdf (2011)</Title>
    <Artist></Artist>
    <FileName>asdfasdf (2011) DVDRip XviD-MAXSPEED</FileName>
    <FileSize>1580908467</FileSize>
    <Type>Video</Type>
    <Hash Type="SHA1">8FB7B1F4984AB6E0746B43D2B82D4ED8102984D5</Hash>
    </Item>
    </Content>
    <History></History>
    <Notes></Notes><Type Retraction="false">DMCA</Type>
    <Detection>
    <Asset>
    <OriginalAssetName>asdfasdf (2011)</OriginalAssetName>
    </Asset>
    <ContentMatched Audio="false" Video="true" Text="false" />
    <HashMatched>true</HashMatched>
    <VerificationID>Manual and automated watermark verification</VerificationID>
    </Detection>
    <Verification>
    <VerificationLevel Type="DT">2</VerificationLevel>
    </Verification>
    <TextNotice><![CDATA[12-03-2011

    XML portion always starts with <Infringement and ends with </Infringement>.
    Actually, it doesn't... the XML starts with the <?xml> tag, but that's just me being pedantic
    Given what you've said, though, it's easy to extract the XML data from a given block of text.
    First, read the source data:
    set theText to read file "path:to:the:file"
    Then you can extract the XML via something like:
    set start_tag to "<?xml"
    set end_tag to "</Infringement>"
    set start_of_data to offset of start_tag in theText
    set end_of_data to (offset of end_tag in theText) + (-1 + (length of end_tag))
    set theXML to text start_of_data through end_of_data of theText
    Now you can write that data to a file:
    set theFile to open for access file ((path to desktop as text) & "output.xml" as text) with write permission
    set eof theFile to 0
    write theXML to theFile starting at 0
    close access theFile
    If you have multiple files you can either run this in a loop that iterates over the files, or save the script as a droplet, then drop the files onto the script icon. Let me know if you need help with that, too.

  • Monitoring using a Dashboard - How do you extract data from different fields?

    I have a situation where a Dashboard needs to be made to monitor the state of different SAP systems.
    Within individual Systems I know its easy to monitor the systems using CCMS (rz20), but my question is, How do you get to pull out the data that is displaying on the CCMS screen so that it could be taken and displayed on a dashboard. A dashboard could be a JAVA program that displays data from various such fields and displays maybe on a TV screen.
    What I found so far was,
    in rz20
    Click on Performance Overview.
    click on CPU Utilization
    So, I place my mouse pointer on Value '2' for User CPU Utilization and hit F1 and then click on Technical Details
    Now even if I place my mouse pointer on Value '1'' for User CPU Utilization and hit F1 and then click on Technical Details I get the same screen as above.
    So, My question is, How do we determine what data sits in what field?
    The aim again is to read these data and populate an external Dashboard.
    The current Systems are not connected to SolMan as we do not have a SolMan setup yet. I am just trying to make a Dashboard using the existing CCMS tool.
    Any thoughts or suggestions would be greatly appreciated.
    Regards,
    Bevin

    Hello Bevin,
    There are other transactions : ST06N/OS07N to check performance data, see note:
    #371023 - OS07/ST06: Monitoring operating system data
    #1084019 - OS07N: New operating system monitor
    All CCMS agents can copy data from the SAPOSCOL shared memory segment to the CCMS monitoring segment and transfer it to a central
    monitoring system. This means that the data is visible in the CCMS monitoring architecture and is displayed both in the familiar transactions ST06
    and OS07 and in the Alert Monitor (transaction RZ20)
    Operating System Collector SAPOSCOL:
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c4/3a6bff505211d189550000e829fbbd/frameset.htmk
    Kind regards,
    Tamas Istenes SAP Support Engineer
    AGS Primary Support, Global Support Center Hungary

  • How do I extract xml from web service

    I am using a web service to send a soap envelope to a third party and I need to troubleshoot the data being sent.
    How do get the code to show me the xml it sending in the soap envelope?

    Hi jmatrone,
    As your issue is related to web service, it is not supported here.
    You could post it in the ASP.net forum for better supports, thanks for your understanding.
    http://forums.asp.net/
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can i read XML from local drive using Javascript into Live Cycle

    Hello,
    I am creating PDF Form using Acrobat LiveCycle.
    I want to write java script for load data into relative field and data present into xml file which is located at local drive
    I have write all method for parsing xml which is required ............... but i am stuck into how to read/open/load local drive xml using javascript?

    sandyrock:
    You'd better post this message to Adobe LiveCycle forum: http://www.adobeforums.com/webx/.3bbeda8d/
    You can use postMessage method in LiveCycle JavaScript to communicate with host application,the host application can be a web brower like IE.
    In IE you can use IE javascript to access local XML file.

  • How to extract data from the fields present in two or three tables

    Hi Experts,
          I have a scenario where i have to extract data from the fields of different tables. e.g. let there 2 tables which have some number of fields . I want the data of 3 fields each from these 2 tables. How can i get that??
    Sam

    Hi
    You can create view in tcode se11..
    here you include all tables from which you want to fetch the data..
    you need to give selection condition here
    eg..
    say select empname from table A, select empadd from table B.. where empno(from A)=empno(from B)
    (note that you dont need to write queries like this.. i have just given u the example)
    After creating the view you can create datasource in RSO2..
    Regards
    Swati

  • How do i extract year from a variable???

    Hi all,
    I want to extract year from a parameter.
    I tried the following, i'm getting errors.
    When I executed the below code,
    SELECT TO_CHAR(:X_PRM_YR_END_DT,'YYYY') FROM dual;
    I got the following error.
    ORA-01722:invalid number
    When I executed the below code,
    SELECT TO_DATE(:X_PRM_YR_END_DT,'YYYY') FROM dual;
    SELECT to_char(TO_DATE(:X_PRM_YR_END_DT,'YYYY')) FROM dual;
    I got the following error.
    ORA-01830: date format end before converting entire input string
    When I executed the below code,
      SELECT extract(YEAR FROM :X_PRM_YR_END_DT) FROM dual;
      SELECT extract(YEAR FROM 1/11/2013) FROM dual;
    I got the following error.
    ORA-30076: invalid extract field for extract source
    How do i extract year from a variable???
    Help me plz
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.

    Try This,
    select TO_CHAR(to_date('01/01/1980','dd/mm/yyyy'),'YYYY') FROM dual;

  • How to parse thus XML data?

    Hi,experts:
    In below thread:
    Receiving .Net dataset with deployed proxies
    i asked how to create a external definition in IR base on above XML data.
    Now,i have created a XSD file base on the XML data.And importing it into IR successfully.
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="zh-CN">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element name="Status">
    <xs:complexType>
    <xs:attribute name="Result" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    And now,the question is how to parse the XML data in diffgr:diffgram  segment.It seems a MS-XML syntax.Can it be parsed by XI?
    I tried,but the following error occurs:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:ZMT_SD_ORDER01_RESULT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start

    Hi,
    The above Exception seems to be because of mapping error.
    Check your mapping for all the mandatory 1-1 mapping, also the 1-unbounded parent node mapping.
    Once when you import the XSD and activate your External Definition if it does without any error then there is no problem with your External Definition.
    If this error occurs only when you test your mapping then this is mapping error and not because of XSD.
    Please check the parent node mapping like 1-unbounded.
    Reward Points if useful
    Regards
    Ashmi.

  • How to Parse the XML generated by Mapping LookUp - RFC API

    Hi Friends,
    I m using the link by Michal Krawczyk for Mapping Lookups - RFC API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    How to parse the XML created in the target node ?
    Regards
    Pravesh

    Hi,
    Check the second half of my code in this blog,
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    It deals with webservice call's but almost the same for RFC.
    Regards
    Bhavesh

  • Problems While Extracting Hours From Date Field

    Hi Guys,
    Hope you are doing well.
    I am facing some problems while extracting hours from date field. Below is an example of my orders table:-
    select * from orders;
    Order_NO     Arrival Time               Product Name
    1          20-NOV-10 10:10:00 AM          Desktop
    2          21-NOV-10 17:26:34 PM          Laptop
    3          22-JAN-11 08:10:00 AM          Printer
    Earlier there was a requirement that daily how many orders are taking place in the order's table, In that I used to write a query
    arrival_time>=trunc((sysdate-1),'DD')
    and arrival_time<trunc((sysdate),'DD')
    The above query gives me yesterday how many orders have been taken place.
    Now I have new requirement to generate a report on every 4 hours how many orders will take place. For an example if current time is 8.00 AM IST then the query should fetch from 4.00 AM till 8 AM how many orders taken place. The report will run next at 12.00 PM IST which will give me order took place from 8.00 AM till 12.00 PM.
    The report will run at every 4 hours a day and generate report of orders taken place of last 4 hours. I have a scheduler which will run this query every hours, but how to make the query understand to fetch order details which arrived last 4 hours. I am not able to achieve this using trunc.
    Can you please assist me how to make this happen. I have checked "Extract" also but I am not satisfied.
    Please help.
    Thanks In Advance
    Arijit

    you may try something like
    with testdata as (
      select sysdate - level/24 t from dual
      connect by level <11
    select
      to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') s
    , to_char(t, 'DD-MM-YYYY HH24:MI:SS') t from testdata
    where
    t >= trunc(sysdate, 'HH') - numtodsinterval(4, 'HOUR')
    S     T
    19-06-2012 16:08:21     19-06-2012 15:08:21
    19-06-2012 16:08:21     19-06-2012 14:08:21
    19-06-2012 16:08:21     19-06-2012 13:08:21
    19-06-2012 16:08:21     19-06-2012 12:08:21trunc ( ,'HH') truncates the minutes and seconds from the date.
    Extract hour works only on timestamps
    regards
    Edited by: chris227 on 19.06.2012 14:13

  • How to extract data from CRICKET MCS410CA using RS232

    I need to extract data from CRICKET and use it for internal Localization of mobile robot.How to use the extracted data to form a map...

    You seem to have the same exact project as someone else... http://forums.ni.com/t5/LabVIEW/cricket-integration/m-p/2052334
    Hmmmmm.....
    Some might think you're all in the same class....

  • How do I extract email from a form and send the PDF to that user?

    How do I extract email from a form and send the PDF to that user?

    here you can add email to send to, CC, Subject, and body message
    var oDoc = event.target;
                        oDoc.mailDoc({
                                                                bUI: false,
                                                                cTo: "Agency Contact Email",
                                                                cCC: "",
                                                                cSubject: "Write your title here,
                                                                cMsg: "Dear" + AgencyContact + "(" + AgencyContactEmail + ")\nThe student, " + FirstName + " " + LastName + " has applied to work at your agency. Please confirm they can work here blah blah blah.......\n\nThanks.\n\nrespectuflly,\n\nme"

Maybe you are looking for