writeback –> ability to modify data that is displayed in an analysis in oracle answers. very crude way of putting it. Please refer to the OBIEE docs from Oracle for the limitations.
Interestingly, this contradicts the basic concept of an OLAP system, which is primarily meant for fetching data rather than inserting data. However there are some special cases, where you would want this functionality. There are certain design considerations too that are involved with the data warehouse, which we will discuss in another post.
I’m creating a demo table for this purpose
create table JT_DEMO_WRITEBACK
(
CUST_KEY NUMBER PRIMARY KEY,
CUST_NAME VARCHAR2(255) NOT NULL,
CUST_RATING NUMBER NOT NULL
);
Login to Oracle Answers. got to Administration page. Under security click the “Manage Privileges” link
change the “Write Back to Database” privilege
start the BI Admin Tool and open your rpd. In the physical layer, create a new connection pool called “WB Connection Pool”. Import this table. create an alias for this table.
disable caching on your physical table that you want to write back to.
create a new Business Model to look like this
we want the Customer Rating field to be editable(writable) in our Answers page.
Create the new subject area in the presentation layer as shown below. for simplicity purpose, I’m setting an implicit fact for the WB Test Subject area.
set the permission to read write for the relevant users
save your rpd and check for consistency.
Enable writeback in the configuration file by Modifying the instanceconfig.xml file located in $(ORACLE_INSTANCE)\config\OracleBIPresentationServicesComponent\coreapplication_obips1
add the following to the instanceconfig.xml file
<WebConfig xmlns="oracle.bi.presentation.services/config/v1.1">
<ServerInstance>
<!-- added by JT -->
<LightWriteback>true</LightWriteback>
</ServerInstance>
</WebConfig>
create a new Analysis as shown
go to the Advanced tab and note the column ids in the xml code. we will use these ids in our xml template to specify the SQL to update the customer rating field.
In the criteria tab, mark the customer rating column writable ( this option is enabled in Answers if you enabled the writable flag for the column in the rpd).
go to results tab –> edit view (pencil icon) –> Table view properties (the xyz icon) and enable writeback option and specify the template name
create your template file which contains the SQL code for the update.
<?xml version="1.0" encoding="utf-8" ?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
<WebMessage name="wb_cusRating">
<XML>
<writeBack connectionPool="WB Connection Pool">
<insert> </insert>
<update>
UPDATE BISAMPLE.JT_DEMO_WRITEBACK SET CUST_RATING=@{c8f6dc321eca7766c} WHERE CUST_KEY=@{c6657b10f6946b91b}
</update>
</writeBack>
</XML>
</WebMessage>
</WebMessageTable>
</WebMessageTables>
save the above text to a new file called writebacktemplateJT.xml put it in the location $(ORACLE_INSTANCE)\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\analyticsRes\customMessages
note:
- you may want to create customMessages directory if it does not exist.
- the line <WebMessage name="wb_cusRating"> specifies the template name.
- save your analysis to a folder as “WB Test”.
Restart OPMN services. login to Answers page with the user, whom you have given the necessary rights. open the “WB Test” analysis
notice that the Cust Rating field is editable, change the value and click on the update button. OBIEE updates the data to the physical database and refreshes the page with the new values.
note: you might get the writeback error in red as shown below
There seems to be a bug with the write back feature in OBIEE 11g. A patch
is currently available only for 64 bit Win systems. Bug 13067844, Patch
13067844. After installing the patch, the writeback works properly.
5 comments:
Hi Jonathan,
Not sure whether you are watching your blog.
I have OBIEE 11.1.1.6.4 installed on my Win 64 Bit Machine.
I followed your blog step by step few days back and I was successfully able to update CUST_RATING.
I am doing it again now and its not working. Its giving the following error:
Write Back Error
An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
I don't understand, how it had worked earlier. I don't have the previous RPD. But I am doing exactly as mentioned in your blog.
Is it a permission issue ? Data type issue ? Column ID Issue ?
Any suggestions/advice will be highly appreciated.
Thanks n Regards
Dev
Hi Dev,
I was not following the blog for some time. I know its been a long time, but did you get over the error? I don't think it is a permission issue since i assume you would have made the field writeable and given the necessary permissions (else it would have not worked in the first place ! ). can you check with Oracle support if any patching has to be done? To my knowledge the patch was meant for 11.1.1.5
In the beginning of the blog, it was said that to refer the Oracle docs for finding the limitations of Obiee WriteBack. Can you please post some of the links to read about the limitations of write back.
Hi Sriram,
you read here about the limitations of the writeback feature. http://docs.oracle.com/cd/E25178_01/bi.1111/e10541/answersconfigset.htm#i1018289
Great help, worked like a charm
Post a Comment