Federation from Essbase to relational database

Hi All,
Currently we have requirement to add attributes from relational database(SQL Server 2005) to Essbase Cube(Hyperion Sftwr: 11.1.2.1) in OBIEE dashboard (OBIEE Sftw:11.1.1.5).I refered in below link
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/biee/r1013/fed_data/fed_data.html#t2
Here it showed horizontal federeation for measures only.Is there any way where we can implement the horizontal federation for the attributes also.Please assist
Thanks,
SatyaB

Satya,
Did you check vertical federation here?
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/biee/r1013/fed_data/fed_data.html#t3
Rgds,
Dpka

Similar Messages

  • Not able to create XML from an existing relational database

    Hi,
    I am trying to create and xml from an existing relational database. I am not able to get any XML data, I receive "XMLTYPE()" as the result.
    Here's the query -
    SQL> select o.order_id, XMLELEMENT("order", XMLATTRIBUTES(o.order_id as ID)) AS "result" from order_
    info o where order_id=2793;
    ORDER_ID
    result()
    +2793+
    XMLTYPE()
    I was expecting to get +<order id=2793 />+ instead of XMLTYPE().
    I am using -
    SQLPlus: Release 9.0.1.0.1*
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    I have also run some checks to confirm XML DB installation -
    SQL> select 1 from all_users where username  = 'XDB';
    +1+
    +1+
    SQL> desc RESOURCE_VIEW;
    Name                                      Null?    Type
    RES                                                SYS.XMLTYPE
    ANY_PATH                                           VARCHAR2(4000)
    RESID                                              RAW(16)
    I think, I have something wrong with installation or configuration.
    Any idea about what have I done wrong here?

    Works fine now. Got the result "<order ID="2793"></order>".
    Thanks. :-)

  • How to extract data from essbase to oracle database incrementally?

    I have to extract data from essbase to an oracle database table incrementally using informatica , can anyone tell me how to do it or give me some tips. I have been thinking about it for a whole day but have no ideas.
    I cannot do the delete & insert method because this oracle database table is a interface table that has to deliver the data to Oracle ESB tables.
    Thanks in advance....

    Hi,
    Have you read through :-
    Oracle Data Integrator Adapter for Hyperion Essbase Getting Started - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_getting_started.pdf
    Oracle Data Integrator Adapter for Hyperion Essbase User's Guide - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_users.pdf
    If you have read them and are still have a problem at what stage are you having the issues?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Daexport from forms to relational database (sql)

    Hi, We have setted an export rule (dataexport) trough which our users do the right click on the form and export data to an sql table.
    I would like to know which is the followed order of eported dimensions. Does it depends on performance setting? or what? I was wondering this since We have changed our performance settings and after that moment 3 columns of the sql table do not match with the exported data( eg the scenario column in sql has data of the Year dimension).
    thanks
    Edited by: user648334 on Jun 7, 2012 6:16 AM

    Satya,
    Did you check vertical federation here?
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/biee/r1013/fed_data/fed_data.html#t3
    Rgds,
    Dpka

  • Accessing Essbase ASO Cube from Oracle Relational database

    Hi All,
    I am a Oracle database developer. We have a requirement where we need to access Hyperion Essbase ASO cube data directly from Relational Database. We have identified below options.
    1. Use Hyperion web service and UTL_HTTP oracle utility
    2. Use JAVA API to access ASO cube. The code of the Java, will be written in Informatica Java Transformation.
    Unfortunetly, i am not getting good resources in Google on how to do?
    Appreciate, if someone share the knowledge if they have implemented this.?

    I am not competent to recommend any particular approach but Essbase.ru has some blog entries on using XMLA / 11.1.2.2 services and a Google Code project...
    http://essbase.ru/archives/category/performance/essbase-api/xmla
    Google will translate if you don't read Russian!

  • Essbase as a source in OBIEE 11g and using lookup to Relation database

    Hello All,
    We are trying to implement Essbase as primary source for our obiee 11g repository and using relational database as secondary source of data.
    I was using a lookup functionality in repository to lookup value from one of the Essbase's Dimension's attribute to relational database, however, there is error when testing this in OBIEE Dashboards.
    And tried to look this error in support.oracle and googled it but was not able to find anything on it.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Src\SQLookupUtility.cpp, line 145. (HY000)
    Have you had any such issue and how can we pass this issue?
    I am trying to find if there are any quick resolution before going to oracle support.
    TIA.
    Parish

    Is Essbase 11.1.1.3 supported as a source for OBIEE 11g?From the certification matrix (http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/bi-11gr1certmatrix-166168.xls) we can see that only Essbase 9.3.3+ and 11.1.2+ are supported, not 11.1.1.3
    Paul

  • Federating Essbase and Relational Data in 11g

    Hi,
    I am trying to display Time Entry measures from both Essbase and Relational data source (OLTP) in one report.
    The People hierarchy in Essbase has 3 levels and I mapped the 3rd level (Gen3 People - Member Key which is actually the Employee Id) to Employee Id column in OLTP. I cannot map the other levels to OLTP because there are no columns that match.
    When I create a report with the ff fields: Gen3 People Member Key, Essbase Measure, OLTP Measure, I am seeing correct values. But when I add Gen3 People, the OLTP Measure column becomes blank. When I add Gen2 People, I am getting "No fact table exists at the requested level of detail".
    Does this mean that I also have to map Gen2 People and Gen3 People to OLTP before I can use them in my report?
    Thanks for the help!

    Hi,
    Thanks a lot for the help.
    I am currently facing following issues in integration.
    1. In my Essbase outline , the child level has some aliases. So when I import in OBIEE, I am getting the alias value instead of the actual. How to get the actual data in OBIEE?
    2. If I am using external data for only one dimension, I am getting the report generated,but all the measures like sales returns no value. But If I am using the sales and some existing cube dimension column, I am getting the values
    3. Inorder to use the other dimension, I followed the creation of total level and added the dummy fact. Still I am getting error 'Unable to navigate requested expression'
    Thanks in advance,
    Many Thanks,
    RS

  • Federation of Essbase with OBIEE 11g

    Hi,
    I have a ragged unbalanced Accounts hierarchy in the Essbase cube which I have imported into the OBIEE repository besides the Scenario,Version,Entity,Period and Year hierarchies. Now I have a detail table in the Oracle database with Account,Version,Scenario,Entity with Value(Measure) at the lowest level of each hierarchy. I have read that for federation, the hierarchies need to be balanced. In the relational table Account dimension, I have maintained consistent no. of levels with null values wherever leaves are absent.  Now as the Accounts hierarchy in the Essbase cube is unbalanced, how should I design to enable the federation between the Essbase cube and relational table? OBIEE version is 11.1.1.6 and Essbase is 11.1.2.2. Your help is highly appreciated.
    Thanks and regards,
    Debarati.

    The issue has been solved by using Lookup tables. The relational database table has also been populated with alias member names. Then in OBIEE BMM layer, using Lookup Sparse function, the Essbase alias members have been used to lookup the value against the Relational Database table which served as lookup table in the BMM layer.
    Thanks and regards,
    Debarati.

  • Horizontal Federation with Essbase

    Hi,
    I want to have a report in Answers that has essbase data alongside data from another SQL source. I went through the Oracle by example guide on how to do this (http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/fed_data/fed_data.html), however, when I try to put the two side by side on a report I am running into some issues. First, I tried to put a salary figure for a manager from sql next to budget data for the same manager from essbase.
    issue 1 - I made the salary aggregation 'sum' and no data showed up when I opened the report in answers.
    issue 2 - I made the salary aggregation ' none' and data showed up when I ran a report for manager - salary, which is great. However, when I try to do manager - salary - budget, I get an error that says 'Unable to navigate requested expression: Market.Gen2,Market. Please fix the metadata consistency warnings.'. Now the schema should be looking at Market.Sales Manager, I am not sure why it is referencing the Market.Gen2,Market.
    Could this be an issue with the Budget aggregation being sum and the salary measure being 'none'? However, I would like the salary to aggregate as a sum so why was I not getting data the first time through? I literally followed the OBE step by step, using a different cube with extremely similar dimensionality.
    Any help is much appreciated. Thanks,
    DQ

    You seem to be hitting several different issues here.
    First of all, I would go and check your BMM layer and how it maps to the physical representation of the cube. "Market.Gen2,Market" is a physical cube column and a dimensional level in a standard cube import whereas in your case it looks like it was renamed to "Market.Sales Manager" in the BMM layer (assumption from my side based on what you write here).
    Are your LTS set up correctly between the SQL data source and the cube in this area? I.e. do you have the respective matching column mappings for the market dimension?
    As for the aggregations. I'm not a fan of that specific OBE since it mixes aggregation rules for Essbase sources between the BMM and physical layer. The "why" is nicely summed up in this post from Venkat: http://oraclebizint.wordpress.com/2009/04/13/oracle-bi-ee-10134-and-essbase-connectivity-understanding-aggregations-part-4/
    Physical Layer: Aggr_External and BMM: SUM
    1. If a report requests data that exists directly in Essbase, then the MDX generated would go only against those intersections.
    2. If a report requests data that does not exist directly in Essbase, then the MDX fired would be pushed against the Essbase layer.
    The major difference in this scenario and the one above is >the fact that Aggregation is the fact that the aggregation in this case
    is done using the SUM function. So, this would generate wrong results if the outline contains Time Based properties like
    TBAverage, TBLast etc. This sometimes can vary based on the outlines.
    3. This supports relational calculation like concatenation etc. But the aggregation would happen only at the BI Server layer. The
    MDX fired would go against all the level-0 intersections. So, >this is generally not recommended. Also, the numbers produced
    might be wrong if you have lots of Label Only or Time Based properties in your outline.I'd go for SUM on both layers. Note that this will force a SUM of the cube though (no surprise) and depending on how and what your account members are calculating in the outline, this will also yield wrong numbers.
    Best advice is anyways to use federated data sources (SQL + MDX) only in specifically defined cases. Don't try to extend your cube outline with relational attributes and expect them to work across all measure dimensions in the same way. (I.e. don't assume that every account and/or scenario intersection will yield the correct value).

  • Errors extracting from Essbase to flat file

    New to ODI, I have the environment working - so I think
    Using ODI 11.1.1.6.0 Studio, no web services, just the studio.
    Essbase 9.3.3 is source
    Target is flat file on C:\ drive of PC
    PC is Windows 7, 32 bit
    running an interface to extract from Essbase outline (metadata) to a flat file (csv) the integration step (4) "Extract Metadata" fails. The first 3 steps are sucessful (drop work table, create work table, begin essbase metadata extract).
    The error messages in the 4th step are:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
         at com.hyperion.odi.essbase.ODIStagingLoader.loadData(Unknown Source)
         at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Loading the data into staging area failed.
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2473)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:561)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
    File "<string>", line 1, in <module>
         at com.hyperion.odi.essbase.ODIStagingLoader.loadData(Unknown Source)
         at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Loading the data into staging area failed.
         at org.python.core.PyException.fillInStackTrace(PyException.java:70)
         at java.lang.Throwable.<init>(Throwable.java:181)
         at java.lang.Exception.<init>(Exception.java:29)
         at java.lang.RuntimeException.<init>(RuntimeException.java:32)
         at org.python.core.PyException.<init>(PyException.java:46)
         at org.python.core.PyException.<init>(PyException.java:43)
         at org.python.core.Py.JavaError(Py.java:455)
         at org.python.core.Py.JavaError(Py.java:448)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
         at org.python.core.PyObject.__call__(PyObject.java:355)
         at org.python.core.PyMethod.__call__(PyMethod.java:215)
         at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
         at org.python.core.PyMethod.__call__(PyMethod.java:206)
         at org.python.core.PyObject.__call__(PyObject.java:381)
         at org.python.core.PyObject.__call__(PyObject.java:385)
         at org.python.pycode._pyx6.f$0(<string>:1)
         at org.python.pycode._pyx6.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:165)
         at org.python.core.PyCode.call(PyCode.java:18)
         at org.python.core.Py.runCode(Py.java:1204)
         at org.python.core.Py.exec(Py.java:1248)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         ... 1 more
    Caused by: com.hyperion.odi.essbase.ODIEssbaseException: Loading the data into staging area failed.
         at com.hyperion.odi.essbase.ODIStagingLoader.loadData(Unknown Source)
         at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
         at org.python.core.PyObject.__call__(PyObject.java:355)
         at org.python.core.PyMethod.__call__(PyMethod.java:215)
         at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
         at org.python.core.PyMethod.__call__(PyMethod.java:206)
         at org.python.core.PyObject.__call__(PyObject.java:381)
         at org.python.core.PyObject.__call__(PyObject.java:385)
         at org.python.pycode._pyx6.f$0(<string>:1)
         at org.python.pycode._pyx6.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:165)
         at org.python.core.PyCode.call(PyCode.java:18)
         at org.python.core.Py.runCode(Py.java:1204)
         at org.python.core.Py.exec(Py.java:1249)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:173)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2473)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:561)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         ... 1 more
    Caused by: java.sql.SQLException: ODI-40400: Invalid format description
         at com.sunopsis.jdbc.driver.file.impl.metadata.MetaDataExtractor.buildTableDescFromRequestSQLExceptionOnly(MetaDataExtractor.java:479)
         at com.sunopsis.jdbc.driver.file.SQLManager.buildCommand(SQLManager.java:437)
         at com.sunopsis.jdbc.driver.file.FileStatement.buildCommand(FileStatement.java:95)
         at com.sunopsis.jdbc.driver.file.FileStatement.executeQuery(FileStatement.java:62)
         ... 40 more
    The "Code" tab of the errored session step has "stats=essbaseAppReader.extract()" in the Target Code, nothing in the Source Code
    In the integration, the "Staging area different from Target" is NOT checked (flat file target).
    The log file shows the outline was read and the members retreived, the log for this execution show:
    2012-06-14 10:36:49,873 INFO [SimpleAsyncTaskExecutor-5]: ODI Hyperion Essbase Adapter Version 9.3.1.1
    2012-06-14 10:36:49,873 INFO [SimpleAsyncTaskExecutor-5]: Connecting to Essbase application [A_USRDFD] on [prodbpm1]:[1423] using username [admin].
    2012-06-14 10:36:52,275 INFO [SimpleAsyncTaskExecutor-5]: Successfully connected to the Essbase application.
    2012-06-14 10:36:52,275 INFO [SimpleAsyncTaskExecutor-5]: Essbase Metadata extract LKM option ALIAS_TABLE = null
    2012-06-14 10:36:52,275 INFO [SimpleAsyncTaskExecutor-5]: Essbase Metadata extract LKM option MEMBER_FILTER_CRITERIA = IDESCENDANTS
    2012-06-14 10:36:52,275 WARN [SimpleAsyncTaskExecutor-5]: Invalid value specified [ ] for member filter value. Using default value [TC Codes].
    2012-06-14 10:36:52,275 INFO [SimpleAsyncTaskExecutor-5]: Essbase Metadata extract LKM option MEMBER_FILTER_VALUE = TC Codes
    2012-06-14 10:36:52,275 INFO [SimpleAsyncTaskExecutor-5]: Essbase Metadata extract LKM option DIMENSION = TC Codes
    2012-06-14 10:36:52,322 INFO [SimpleAsyncTaskExecutor-5]: Executing essbase member selection to fetch the metadata
    2012-06-14 10:36:52,572 INFO [SimpleAsyncTaskExecutor-5]: Total number of metadata records fetched from essbase : [574].
    2012-06-14 10:36:52,572 DEBUG [SimpleAsyncTaskExecutor-5]: Constructing iterator for the extracted data
    2012-06-14 10:36:52,572 INFO [SimpleAsyncTaskExecutor-5]: Loading the staging area with the extracted records
    2012-06-14 10:36:52,572 INFO [SimpleAsyncTaskExecutor-5]: Logging out and disconnecting from the essbase application.
    2012-06-14 10:49:45,408 INFO [SimpleAsyncTaskExecutor-6]: ODI Hyperion Essbase Adapter Version 9.3.1.1
    2012-06-14 10:49:45,408 INFO [SimpleAsyncTaskExecutor-6]: Connecting to Essbase application [A_USRDFD] on [prodbpm1]:[1423] using username [admin].
    2012-06-14 10:49:47,748 INFO [SimpleAsyncTaskExecutor-6]: Successfully connected to the Essbase application.
    2012-06-14 10:49:47,748 INFO [SimpleAsyncTaskExecutor-6]: Essbase Metadata extract LKM option ALIAS_TABLE = null
    2012-06-14 10:49:47,748 INFO [SimpleAsyncTaskExecutor-6]: Essbase Metadata extract LKM option MEMBER_FILTER_CRITERIA = IDESCENDANTS
    2012-06-14 10:49:47,748 WARN [SimpleAsyncTaskExecutor-6]: Invalid value specified [ ] for member filter value. Using default value [TC Codes].
    2012-06-14 10:49:47,748 INFO [SimpleAsyncTaskExecutor-6]: Essbase Metadata extract LKM option MEMBER_FILTER_VALUE = TC Codes
    2012-06-14 10:49:47,748 INFO [SimpleAsyncTaskExecutor-6]: Essbase Metadata extract LKM option DIMENSION = TC Codes
    2012-06-14 10:49:47,795 INFO [SimpleAsyncTaskExecutor-6]: Executing essbase member selection to fetch the metadata
    2012-06-14 10:49:47,951 INFO [SimpleAsyncTaskExecutor-6]: Total number of metadata records fetched from essbase : [574].
    2012-06-14 10:49:47,951 DEBUG [SimpleAsyncTaskExecutor-6]: Constructing iterator for the extracted data
    2012-06-14 10:49:47,966 INFO [SimpleAsyncTaskExecutor-6]: Loading the staging area with the extracted records
    2012-06-14 10:49:47,966 INFO [SimpleAsyncTaskExecutor-6]: Logging out and disconnecting from the essbase application.
    Only the file name being written to in the Target exists, it is updated with the column headings:
    C1_SORTID,C2_PARENTNAME,C3_MEMBERNAME,C4_ALIAS,C5_DATASTORAGE,C6_TWOPASSCALC,C7_CONSOLIDATION,C8_UDA,C9_FORMULA,C10_COMMENT
    There are no other files in the the Target flat file folder
    I did have to add a primary key to the target datastore, added as PK_Sortid on the "SortID" column in order to get the flow to run. The LKM used is "LKM Hyperion Essbase METADATA to SQL.GLOBAL", the CKM is "CKM SQL.GLOBAL" ( the only one showing from the drop down).
    I don't know what else to check or change.
    thanks

    I think I saw somewhere in your post that Staging different from target is NOT checked, probably why you are getting lots of 'loading to staging area errors'. Your staging area has to be able to support relational operations i.e a relational database such as SQL Server or Oracle or the SUNOPSIS Memory Engine. In your interface make sure you check the staging differnet from target and for example select the SUNOPSIS Memory Engine as your staging area. Resave the interfece and re-run.

  • Web Analysis Report prompted for relational database login

    We have given access to the WA reports and everything works fine in general. One of the user trying to open same report(s) document(s) via Workspace and its getting prompted with relational database login? I have verified for the access and everything seems to be fine.
    I do not know the reason for this. Can anyone help me? Thanks.

    From the forums, i got the below MAXL commands to sync the user access :
    alter system resync sss; --> this command will sync all the users, groups.
    alter group <group name> sync security with all application; --> This can be used to individually sync the required group
    alter user <user name> sync security with all application; --> This can be used to individually sync the required user
    Will check it up with user on any change in her access.
    Thanks,
    Praveen.

  • Loading data from flatfile to relational table,i am getting SQLLDR error

    Hi,
    While loading data from flatfile to relational table,i am getting SQLLDR error and i am unable to proceed further.
    Source is a flatfile and target is a Oracle database,i used "LKM file to oracle(SQLLDR)" and "IKM sql control append"
    and ran the interface.When i checked the seesion in operator window" after generating "CTL file" successfully
    the session got failed at "Call sqlldr" and was not able to proceed further.
    Environment details:
    ODI 11g
    database:Oracle 11g
    Operating system:Windows server 2008
    The error message it displayed in call sqlldr session file was
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 31, in ?
    File "C:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\client\odi\bin\..\..\jdev\extensions\oracle.odi.navigator\scripting\Lib\javaos.py", line 198, in system
    File "C:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\client\odi\bin\..\..\jdev\extensions\oracle.odi.navigator\scripting\Lib\javaos.py", line 224, in execute
    OSError: (0, 'Failed to execute command ([\'sh\', \'-c\', \'sqlldr DEVELOPER/pass_123@CPRDEV control="F:\\\\flatfile/CROSS_CURR.ctl" log="F:\\\\flatfile/CROSS_CURR.log" > "F:\\\\flatfile/CROSS_CURR.out" \']): java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified')
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:345)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:169)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2374)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1615)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1580)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2755)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)
    could u give me a solution to sort out this error ASAP.
    thanks,
    keshav.

    This was the following code generated .
    import java.lang.String
    import java.lang.Runtime as Runtime
    from jarray import array
    import java.io.File
    import os
    import re
    import javaos
    def reportnbrows():          
         f = open(r"F:\flatfile/TEST.log", 'r')
         try:
              for line in f.readlines():
                   if line.find("MAXIMUM ERROR COUNT EXCEEDED")>=0 :
                        raise line
         finally:
              f.close()
    ctlfile = r"""F:\flatfile/TEST.ctl"""
    logfile = r"""F:\flatfile/TEST.log"""
    outfile = r"""F:\flatfile/TEST.out"""
    oracle_sid=''
    if len('CPRDEV')>0: oracle_sid = '@'+'CPRDEV'
    loadcmd = r"""sqlldr DEVELOPER/<@=snpRef.getInfo("DEST_PASS") @>%s control="%s" log="%s" > "%s" """ % (oracle_sid,ctlfile, logfile, outfile)
    rc = os.system(loadcmd)
    if rc <> 0 and rc <> 2:
    raise "Load Error", "See %s for details" % logfile
    if rc==2:
    reportnbrows()

  • Error while extracting data from essbase

    Hi All,
    Now I'm tring to extract data from essbase by ODI, and at the sametime, I need to do some transformations, such as join with other relational tables or flat files to get more information about metadata. But unfortunately, once I add join into the interface, an error occurs. And it works fine if I extract directly (with no joins).
    Is there any other way except using staging table? Our data vloume is large, using staging table will waste lots of storages.
    The messages as below.
    2011-07-12 23:34:00,931 INFO [DwgCmdExecutionThread:null:49]: ODI Hyperion Essbase Adapter Version 9.3.1.1
    2011-07-12 23:34:00,931 INFO [DwgCmdExecutionThread:null:49]: Connecting to Essbase application [CORPPROD] on [172.18.93.150]:[1423] using username [admin].
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Successfully connected to the Essbase application.
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase data extract LKM option EXTRACTION_QUERY_FILE = D:\ODI_ESS_QUERIES\QUERY.TXT
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase data extract LKM option EXTRACTION_QUERY_TYPE = ReportScript
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase Load IKM option PRE_CALCULATION_SCRIPT = null
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase data extract LKM option EXT_COL_DELIMITER =      
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase Load IKM option PRE_EXTRACT_MAXL =
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase Load IKM option POST_EXTRACT_MAXL =
    2011-07-12 23:34:00,962 INFO [DwgCmdExecutionThread:null:49]: Essbase Load IKM option ABORT_ON_PRE_MAXL_ERROR = true
    2011-07-12 23:34:00,962 DEBUG [DwgCmdExecutionThread:null:49]: inside getAppData()
    2011-07-12 23:34:00,962 DEBUG [DwgCmdExecutionThread:null:49]: Got Source Metadata
    2011-07-12 23:34:01,119 ERROR [DwgCmdExecutionThread:null:49]: The number of columns returned by script [13] is less than the source data columns exposed [14]
    com.hyperion.odi.essbase.ODIEssbaseException: The number of columns returned by script [13] is less than the source data columns exposed [14]
         at com.hyperion.odi.essbase.wrapper.EssbaseReportDataIterator.validateColumns(Unknown Source)
         at com.hyperion.odi.essbase.wrapper.EssbaseReportDataIterator.init(Unknown Source)
         at com.hyperion.odi.essbase.ODIEssbaseDataReader.getAppData(Unknown Source)
         at com.hyperion.odi.essbase.AbstractEssbaseReader.extract(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor769.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx85.f$0(<string>:1)
         at org.python.pycode._pyx85.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    2011-07-12 23:34:01,119 INFO [DwgCmdExecutionThread:null:49]: Logging out and disconnecting from the essbase application.
    From the working steps, I found a redundant column (Entity) was added while creating work table. Is it the reason?
    create table HYP.C$_0CUX_ABC_HYP_INTERFACE
         C14_HSP_RATES      VARCHAR2(80) NULL,
         C3_ACCOUNT      VARCHAR2(80) NULL,
         C10_PERIOD      VARCHAR2(80) NULL,
         C7_SCENARIO      VARCHAR2(80) NULL,
         C9_CURRENCY      VARCHAR2(80) NULL,
         C15_YEAR      VARCHAR2(80) NULL,
         C6_DATATYPE      VARCHAR2(80) NULL,
         C2_VERSION      VARCHAR2(80) NULL,
         C1_CATEGORY      VARCHAR2(80) NULL,
         C12_ENTITY      VARCHAR2(80) NULL,
         C13_ENTITY      VARCHAR2(80) NULL,
         C11_DEPARTMENT      VARCHAR2(80) NULL,
         C8_PROJECT      VARCHAR2(80) NULL,
         C5_DATA      NUMBER(18,8) NULL
    Appriciated!

    Extract the essbase data to a staging area and then do the transformations in another interface.
    The adaptor needs to extract the data first.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Insert XML file into Relational database model - no XMLTYPE!

    Dear all,
    How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
    I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
    However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
    We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
    The database does and will not contain XMLTYPES, only plain RDBMS tables.
    Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
    Cheers.
    Luc.
    Edited by: user6693852 on Jan 13, 2009 7:02 AM

    In case you decide to follow my advice, here's a simple example showing how to do this.. (Note the XMLTable syntax is the preferred approach in 10gr2 and later..
    SQL> spool testase.log
    SQL> --
    SQL> connect / as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = XDBTEST
    SQL> --
    SQL> def PASSWORD = XDBTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user XDBTEST cascade
    User dropped.
    Elapsed: 00:00:00.59
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASS
    ORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &
    ASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDB
    EST
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> var SCHEMAURL varchar2(256)
    SQL> var XMLSCHEMA CLOB
    SQL> --
    SQL> set define off
    SQL> --
    SQL> begin
      2    :SCHEMAURL := 'http://xmlns.example.com/askTom/TransactionList.xsd';
      3    :XMLSCHEMA :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
      7     <xs:element name="TransactionList" type="transactionListType" xdb:defaultTable="LOCAL_TABLE"/>
      8     <xs:complexType name="transactionListType"  xdb:maintainDOM="false" xdb:SQLType="TRANSACTION_LIST_T">
      9             <xs:sequence>
    10                     <xs:element name="Transaction" type="transactionType" maxOccurs="unbounded" xdb:SQLCollType="TRANSACTION_V"
    >
    11             </xs:sequence>
    12     </xs:complexType>
    13     <xs:complexType name="transactionType" xdb:maintainDOM="false"  xdb:SQLType="TRANSACTION_T">
    14             <xs:sequence>
    15                     <xs:element name="TradeVersion" type="xs:integer"/>
    16                     <xs:element name="TransactionId" type="xs:integer"/>
    17                     <xs:element name="Leg" type="legType" maxOccurs="unbounded" xdb:SQLCollType="LEG_V"/>
    18             </xs:sequence>
    19             <xs:attribute name="id" type="xs:integer" use="required"/>
    20     </xs:complexType>
    21     <xs:complexType name="paymentType"  xdb:maintainDOM="false" xdb:SQLType="PAYMENT_T">
    22             <xs:sequence>
    23                     <xs:element name="StartDate" type="xs:date"/>
    24                     <xs:element name="Value" type="xs:integer"/>
    25             </xs:sequence>
    26             <xs:attribute name="id" type="xs:integer" use="required"/>
    27     </xs:complexType>
    28     <xs:complexType name="legType"  xdb:maintainDOM="false"  xdb:SQLType="LEG_T">
    29             <xs:sequence>
    30                     <xs:element name="LegNumber" type="xs:integer"/>
    31                     <xs:element name="Basis" type="xs:integer"/>
    32                     <xs:element name="FixedRate" type="xs:integer"/>
    33                     <xs:element name="Payment" type="paymentType" maxOccurs="unbounded"  xdb:SQLCollType="PAYMENT_V"/>
    34             </xs:sequence>
    35             <xs:attribute name="id" type="xs:integer" use="required"/>
    36     </xs:complexType>
    37  </xs:schema>';
    38  end;
    39  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> set define on
    SQL> --
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(:XMLSCHEMA);
      4  begin
      5    dbms_xmlschema.registerSchema
      6    (
      7      schemaurl => :schemaURL,
      8      schemadoc => xmlSchema,
      9      local     => TRUE,
    10      genTypes  => TRUE,
    11      genBean   => FALSE,
    12      genTables => TRUE,
    13      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    14    );
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.26
    SQL> desc LOCAL_TABLE
    Name                                                                   Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/askTom/TransactionList.xsd" Element "TransactionList") STORAGE Object-rela
    ional TYPE "TRANSACTION_LIST_T"
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TradeVersion/text()') tradeversion,
      5    extractvalue(x.column_value,'/Transaction//text()') transactionid
      6  from
      7    local_table,
      8    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x
      9  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/Basis/text()') leg_basis,
      6    extractValue(y.column_value,'/Leg/FixedRate/text()') leg_fixedrate
      7  from
      8    local_table,
      9    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    10    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y
    11  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/LegNumber/text()') leg_legnumber,
      6    extractvalue(z.column_value,'/Payment/StartDate/text()') pay_startdate,
      7    extractValue(z.column_value,'/Payment/Value/text()') pay_value
      8  from
      9    local_table,
    10    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    11    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y,
    12    table(xmlsequence(extract(y.column_value,'/Leg/Payment'))) z
    13  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW
    Name                                                                   Null?    Type
    TRADEVERSION                                                                    NUMBER(38)
    TRANSACTIONID                                                                   VARCHAR2(4000)
    SQL> --
    SQL> desc TRAN_LEG_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_BASIS                                                                       NUMBER(38)
    LEG_FIXEDRATE                                                                   NUMBER(38)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_LEGNUMBER                                                                   NUMBER(38)
    PAY_STARTDATE                                                                   DATE
    PAY_VALUE                                                                       NUMBER(38)
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW_XMLTABLE
      2  as
      3  select t.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRADE_VERSION  NUMBER(4) path 'TradeVersion/text()',
    11            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()'
    12         ) t
    13  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW_XMLTABLE
      2  as
      3  select t.TRANSACTION_ID, L.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           LEG_BASIS      NUMBER(4) path 'Basis/text()',
    20           LEG_FIXED_RATE NUMBER(4) path 'FixedRate/text()'
    21         ) l
    22  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW_XMLTABLE
      2  as
      3  select TRANSACTION_ID, L.LEG_NUMBER, P.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           PAYMENT        XMLType   path 'Payment'
    20         ) L,
    21         XMLTABLE
    22         (
    23           '/Payment'
    24           passing PAYMENT
    25           columns
    26           PAY_START_DATE     DATE      path 'StartDate/text()',
    27           PAY_VALUE          NUMBER(4) path 'Value/text()'
    28         ) p
    29  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRADE_VERSION                                                                   NUMBER(4)
    TRANSACTION_ID                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    LEG_BASIS                                                                       NUMBER(4)
    LEG_FIXED_RATE                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    PAY_START_DATE                                                                  DATE
    PAY_VALUE                                                                       NUMBER(4)
    SQL> --
    SQL> set long 10000 pages 100 lines 128
    SQL> set timing on
    SQL> set autotrace on explain
    SQL> set heading on feedback on
    SQL> --
    SQL> VAR DOC1 CLOB
    SQL> VAR DOC2 CLOB
    SQL> --
    SQL> begin
      2    :DOC1 :=
      3  '<TransactionList>
      4    <Transaction id="1">
      5      <TradeVersion>1</TradeVersion>
      6      <TransactionId>1</TransactionId>
      7      <Leg id="1">
      8        <LegNumber>1</LegNumber>
      9        <Basis>1</Basis>
    10        <FixedRate>1</FixedRate>
    11        <Payment id="1">
    12          <StartDate>2000-01-01</StartDate>
    13          <Value>1</Value>
    14        </Payment>
    15        <Payment id="2">
    16          <StartDate>2000-01-02</StartDate>
    17          <Value>2</Value>
    18        </Payment>
    19      </Leg>
    20      <Leg id="2">
    21        <LegNumber>2</LegNumber>
    22        <Basis>2</Basis>
    23        <FixedRate>2</FixedRate>
    24        <Payment id="1">
    25          <StartDate>2000-02-01</StartDate>
    26          <Value>10</Value>
    27        </Payment>
    28        <Payment id="2">
    29          <StartDate>2000-02-02</StartDate>
    30          <Value>20</Value>
    31        </Payment>
    32      </Leg>
    33    </Transaction>
    34    <Transaction id="2">
    35      <TradeVersion>2</TradeVersion>
    36      <TransactionId>2</TransactionId>
    37      <Leg id="1">
    38        <LegNumber>21</LegNumber>
    39        <Basis>21</Basis>
    40        <FixedRate>21</FixedRate>
    41        <Payment id="1">
    42          <StartDate>2002-01-01</StartDate>
    43          <Value>21</Value>
    44        </Payment>
    45        <Payment id="2">
    46          <StartDate>2002-01-02</StartDate>
    47          <Value>22</Value>
    48        </Payment>
    49      </Leg>
    50      <Leg id="22">
    51        <LegNumber>22</LegNumber>
    52        <Basis>22</Basis>
    53        <FixedRate>22</FixedRate>
    54        <Payment id="21">
    55          <StartDate>2002-02-01</StartDate>
    56          <Value>210</Value>
    57        </Payment>
    58        <Payment id="22">
    59          <StartDate>2002-02-02</StartDate>
    60          <Value>220</Value>
    61        </Payment>
    62      </Leg>
    63    </Transaction>
    64  </TransactionList>';
    65    :DOC2 :=
    66  '<TransactionList>
    67    <Transaction id="31">
    68      <TradeVersion>31</TradeVersion>
    69      <TransactionId>31</TransactionId>
    70      <Leg id="31">
    71        <LegNumber>31</LegNumber>
    72        <Basis>31</Basis>
    73        <FixedRate>31</FixedRate>
    74        <Payment id="31">
    75          <StartDate>3000-01-01</StartDate>
    76          <Value>31</Value>
    77        </Payment>
    78      </Leg>
    79    </Transaction>
    80  </TransactionList>';
    81  end;
    82  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC1))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC2))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> select * from TRAN_VIEW_XMLTABLE
      2  /
    TRADE_VERSION TRANSACTION_ID
                1              1
                2              2
               31             31
    3 rows selected.
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 650975545
    | Id  | Operation          | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS      |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |*  2 |   TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   138 |     3   (0)| 00:00:01 |
    |*  3 |   INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       3 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER  LEG_BASIS LEG_FIXED_RATE
                 1          1          1              1
                 1          2          2              2
                 2         21         21             21
                 2         22         22             22
                31         31         31             31
    5 rows selected.
    Elapsed: 00:00:00.04
    Execution Plan
    Plan hash value: 1273661583
    | Id  | Operation           | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |*  1 |  HASH JOIN          |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |   2 |   NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  3 |    TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  4 |    INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  5 |   TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   295 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       3 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       4 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       5 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_PAY_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER PAY_START  PAY_VALUE
                 1          1 01-JAN-00          1
                 1          1 02-JAN-00          2
                 1          2 01-FEB-00         10
                 1          2 02-FEB-00         20
                 2         21 01-JAN-02         21
                 2         21 02-JAN-02         22
                 2         22 01-FEB-02        210
                 2         22 02-FEB-02        220
                31         31 01-JAN-00         31
    9 rows selected.
    Elapsed: 00:00:00.07
    Execution Plan
    Plan hash value: 4004907785
    | Id  | Operation            | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  1 |  HASH JOIN           |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  2 |   HASH JOIN          |                                |     5 |   480 |     7  (15)| 00:00:01 |
    |   3 |    NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  4 |     TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  5 |     INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  6 |    TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   215 |     3   (0)| 00:00:01 |
    |*  7 |   TABLE ACCESS FULL  | SYS_NTelW4ZRtKS+WKqCaXhsHnNQ== |     9 |   378 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0000900010$")
       2 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       4 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       5 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       6 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       7 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL>Out of interest why are you so against using XMLType...
    Edited by: mdrake on Jan 13, 2009 8:25 AM

  • Insert XML file into Relational database model without using XMLTYPE tables

    Dear all,
    How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
    I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
    However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
    We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
    The database does and will not contain XMLTYPES, only plain RDBMS tables.
    Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
    Constraints : Input via XML files defined by third party
    Storage : relational database model with hundreds of tables and thousands of existing queries that can not be touched. The model must not be altered.
    Target : get this XML into the database on a daily basis via an automated process.
    Cheers.
    Luc.

    Luc,
    your Doomed !
    If you would try something like DBMS_XMLSTORE, you probably would be into serious performance problems in your case, very fast, and it would be very difficult to manage.
    If you would use a little bit of XMLType stuff, you would be able to shred the data into the relational model very fast and controlable. Take it from me, I am one of those old geezers like Mr. Tom Kyte way beyond 40 years (still joking). No seriously. I started out as a classical PL/SQL, Forms Guy that switched after two years to become a "DBA 1.0" and Mr Codd and Mr Date were for years my biggest hero's. I have the utmost respect for Mr. Tom Kyte for all his efforts for bringing the concepts manual into the development world. Just to name some off the names that influenced me. But you will have to work with UNSTRUCTURED data (as Mr Date would call it). 80% of the data out there exists off it. Stuff like XMLTABLE and XML VIEWs bridge the gap between that unstructured world and the relational world. It is very doable to drag and drop an XML file into the XMLDB database into a XMLtype table and or for instance via FTP. From that point on it is in the database. From there you could move into relational tables via XMLTABLE methods or XML Views.
    You could see the described method as a filtering option so XML can be transformed into relational data. If you don't want any XML in your current database, then create an small Oracle database with XML DB installed (if doable 11.1.0.7 regarding the best performance --> all the new fast optimizer stuff etc). Use that database as a staging area that does all the XML shredding for you into relational components and ship the end result via database links and or materialized views or other probably known methodes into your relational database that isn't allowed to have XMLType.
    This way you would keep your realtional Oracle database clean and have the Oracle XML DB staging database do all the filtering and shredding into relational components.
    Throwing the XML DB option out off the window beforehand would be like replacing your Mercedes with a bicycle. With both you will be able to travel the distance from Paris to Rome, but it will take you a hell of lot longer.
    :-)

Maybe you are looking for

  • Date wise Stock

    Hi Everyone this is the original database table  Item_NO Posting_date EntryType LocationCode Quantity I0013078 12-2-2013 4 RW003 -1 I0013078 12-2-2013 4 INTRNASIT 1 I0013077 12-2-2013 4 RW003 -1 I0013077 12-2-2013 4 RW003 -1 I0013079 12-2-2013 4 INTR

  • Error in Process chain while deleting index and create index

    While executing the process chain  for delete index  the process chain failed with the below error message as "The system has not finished loading request 445315 into data target ZECC_C01". While creating index also it failed with error message as "L

  • Applet borders in browsers

    I am running a Swing applet in a side frame of a browser window. My problem is that the applet is drawn with a border that is completely wasted space. Is there anyway to make the applet take up the entire area of the frame rather than leaving this sp

  • How to detect mobile phone number???

    Hi, Is there a way to get phone number somehow? well what i m trying to do is, connect a web site from mobile and fill some fields (may be send picture to this page). While connected to this page, i want to detect and keep this mobile's number. Any s

  • Fade in/out library sound?

    hi all having real problems finding anything about fading in and out sound in flash, have searched for 3 days now and found mostly as2 related articles, wondering if you could help me out? i have the following var myintSnd:introSound; var sndintChann