Monday, April 15, 2013

OBIEE 11g Configure Writeback



Write Back
  • It provides users of a dashboard page or an analysis with the ability to modify the data that they see in the table view. 
  • It is the ability in OBIEE to allow the user to enter a value or values directly into a report and have those values written into the database.
  • Values are written back to an actual physical table in the database.
  • Only if the user has the “Write back to database privilege”, then the writeback fields in the reports will editable.
Steps to configure write back:
1.    Create a physical table with write back columns.
2.    Import the write back table.
3.    Enable write back for the connection pool.
4.    Enable write back for logical columns.
5.    Set the write back permission’s in the presentation layer.
6.    Enable write back in the instanceconfig.xml file.
7.    Create the write back template.
8.    Store the write back template.
9.    Grant write back privileges.
10. Create an analysis with columns enabled for write back.
11. Override the default data format.
12. Enable write back in the table view.
13. Verify results.

C:\BI11g\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1\instanceconfig.xml

Step 1: In the Physical Layer

  • Select a table to which you would like to writeback (for now we are doing product)
  • Right click
  • Check “Override Source Table caching properties” in order to uncache.



Step 2: In the BMM Layer

  • Go to the table column (same as the physical layer)
  • Double click column to open the logical column properties (Product Column)


  •  Under General Tab – check Writeable



Step 3: In the Presentation Layer


  • Double click the column product and click on Permissions in the General Tab
  • Apply Read/Write to a user



  • Drag the product key to the product table in the presentation layer.

(Note: Product key is necessary in order to writeback since we are making changes in the product column)

Step 4: Give Permission to the User/Application Roles


  • On the top page Click Manage – Identity

  • Click on Application Roles on the right pane and then double click on the User (In our case we have   BIAdministrator)



  • Click on permissions and then the Query limits tab
  • Scroll to the end right and in the Execute Direct Database Request drop down and make it to ALLOW



  • Save the repository and click Yes, on Check Global consistency.


Step 5: Make Changes in XML


  • Open the instanceconfig.xml from the following path
C:\BI11g\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1\ instanceconfig.xml

Add: <LightWriteback>true</LightWriteback>
To the XML file between <ServerInstance>


Step 6: Go to OBIEE


  • Click on Administration
  • Under Security click on Manage Privileges
  • Scroll all the way down to Write Back , Under Write back to database click Authenticated User




  • On the right pane Permission drop down and select Granted.
  • Similarly,  under Manage Write Back click BI Administrator Role
  • On the right pane Permission drop down and select Granted

Deploy the rpd since changes were made.

Step 7: OBIEE Analysis


  • Create Analysis on the same subject Area
  • Under Products double click Product key,  Product and Revenue
In the Selected columns on the right pane you should have Product key, Product and Revenue columns
In Criteria, selected columns Click Product Column Properties and click Write Back tab



  • And Check Write Back with Text Field Width n no. of columns.
  • Click OK and then go the results tab
  • In the compound layout Click on edit view and table view properties.
  • Go the Write back tab and enable write back and Name the Template



Step 8: Create a xml file (writeback.xml)


<?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="testwriteback">
<XML>
<writeBack connectionPool="Connection Pool">
<insert></insert>
<update>
UPDATE SAMP_PRODUCTS_D SET PROD_DSC=’@2’ WHERE PROD_KEY=@1
</update>
</writeBack>
</XML>
</WebMessage>
</WebMessageTable>
</WebMessageTables>
</WebMessageTable>
</WebMessageTables>

OR

<?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="WriteBack">

<XML>

<writeBack connectionPool="Connection Pool">

<insert></insert>


<update>
UPDATE SAMP_PRODUCTS_D SET PROD_DSC = '@2' WHERE PROD_KEY = @1
</update>

</writeBack>

</XML>

</WebMessage>

</WebMessageTable>

</WebMessageTables>

We have selected 3 Columns in our analysis,
Product key, product and revenue.
Since product key is the first column it will be named as @1
Product as @2 and revenue as @3 respectively.

Save the XML as WriteBack.xml (Choose all files) and save it under
C:\BI11g\instances\instance1\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\analyticsRes\customMessages

Go back to the analysis and rename any of the products and check in the sql developer.







4 comments:

  1. my requirement is I have a group called Section supervisors and in that I don't want few of the users not to have this writeback feature to be implemented and the group must contain the writeback privileges. In such a case how do I need to configure the permissions for that particular writeback table/ column. Please explain.. Thanks in advance

    ReplyDelete
  2. Hello
    Configured everything as per the details provided. But when I click on Apply button on the analysis, error is its not able to read the writeback xml.

    Can you specify the path for writeback xml for 11.1.1.7 version?

    Thanks

    ReplyDelete
    Replies
    1. The path shown is correct. Try to restart OBIEE

      Delete
  3. Same Error and using the same version. Were you able to fix this?
    Thanks.

    ReplyDelete