You are on page 1of 7

Write Back Setting in OBIEE 11G

Write Back is the ability to enter values directly into a report and have those values written in the
database & used in calculations and charts in the report.
Please follow the steps listed below to configure Write Back in OBIEE 11g.

A- Repository Level Changes in all 3 layers to set Write Back Column :


Step 1:Physical Layer - From Physical Table Properties Go to-> General tab dialog box. Uncheck
Cacheable
Step 2: Business Model & Mapping Layer - Logical Column Properties Go to-> General tab. Check
Writable option.
Step 3: Presentation Layer - Presentation Column Properties Go to-> General tab -> Permissions ->
Set permission -> Read / Write (Radio Button), on the User / Application Role which you want to
authenticate for WriteBack feature.
Step 4: Presentation Layer - Go to -> Manage-> Identity Manager -> Identity Management (Left pane) ->
Select Application Role (to which you need Write Back Permission) -> Permission -> Query Limits (tab) ->
Select Database (to which you need direct database execution rights) -> Change option from ignore to
allow to the field named "Execute Direct Database Requests".
Now we are done with Repository level changes for WriteBack column. Let us proceed with other
changes.

B- Changes in the File Level :


Step 1: Enable Write Back. Add the LightWriteback tag within the serverinstance tag
of instanceconfig.xml file ( file path $ORACLE_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_obips1 )
<LightWriteback>true</LightWriteback>
If this entry already exists then no modifications required, else restart
OracleBIPresentationServicesComponent for this change to be effective.
Step 2: WriteBack Template. You may give any name for the writeback.xml file. Here for example i am
using the file name as writeback_sample.xml
Things to do before you start the Template:

Identify the columns that are to be referenced.

We can use the column position or by column id in the XML definition.

We must include both insert and update statements in the template.

Template to be placed in the path:


$ORACLE_INSTANCE/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obi
ps1/analyticsRes/customMessages
Write-Back Template example: Name - eg. writeback_sample.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="WriteBack_Template_Name">
<XML>
<writeBack connectionPool="Connection_pool_name">
<insert>INSERT INTO Customer VALUES('@1','@2',@3,'@4',@5)</insert>
<update>UPDATE Customer set Address='@2' where Name='@1'</update>
<!-- Identify the columns that are to be referenced. We can use the column position like @1 for first
column, or by column id as you see them in the XML definition. -->
</writeBack>
</XML>
</WebMessage>
==================================================
[ Note - You need to mention insert & update statements based on your requirement. Above insert &
update code is only for sample purpose & content within <!-- #### --> are comments.]
In the above xml file...
Important Tags

WebMessage name - The name here will be used as WriteBack template name in analysis ->
Table Properties -> Write Back.

Write Back connectionPool - Connection pool name for Write Back.

insert - Based on your requirement or leave blank ( if not required)

update - Based on your requirement or leave blank ( if not required)


Now we are done with changes in the files. Lets proceed further & know what changes we need to make
in analysis for the writeback report...

C- Changes in Analytics :
Step 1: Give Privilege to the Role for Write Back ( Administration -> Manage Privilege -> Write Back &
add the role for writeback privilege).

Step 2: Now you need to edit Column Properties -> writeback -> Check 'Enable Write Back' of the field
needed for writeback, from criteria tab.

Step 3: Now edit Table Properties view -> writeback & check 'Enable Write Back' & mention Template
Name as mentioned in writeback file ( WebMessage name="WriteBack_Template_Name" ). You may
also rename Apply, Revert & Done Button & change Button Position if required.

You are now done with all WriteBack settings. You may test the report for set writeback features.

1. OBIEE11g Configuring Two Facts with


Non Confirmed Dimensions.
There will be situations in the business to build a report with multiple facts using confirmed as well as nonconfirmed dimensions.
Below is an example to demonstrate the configuration in OBIEE 11g.

DIM_1 is non-confirmed dimension and DIM_2 is confirmed dimension.


Below are the steps to configure in the OBIEE 11g.
Import all the DIMS and FACTs, apply physical joins as shown in the above picture.
Create a logical model and move a fact which has maximum joins along with corresponding dims, example above
move FACT_2, DIM_1 and DIM_2. Rename the fact table like fact.
Add other fact measures from physical layer to BBM layer model (example to fact logical table). This will bring two
LTS to the logical fact as shown below.

Next, create dimension hierarchies and add the aggregation to the measures based on requirements (example
sum)
Go to the Amount measure properties and in the content tab set the DIM2 level to Total, as this measure from
FACT_1 doesnt have join to DIM_2, this will make it level based measure. If you dont set the level to total, the
query will provide null values for amount measure. If you want to avoid nulls, add detail level for all the confirmed
dimensions.

Promote the model to presentation layer and create the report.

The above report will provide data from two facts with non-confirmed dimension. The report will create two
separate physical queries and combine both the results using full outer join. Below are the physical queries.
Physical Query when the level is set to Total.
WITH
SAWITH0 AS (select sum(T758957.DISCOUNT) as c1,
T758947.NAME2 as c2,
T758944.NAME as c3
from
DIM_1 T758944,
DIM_2 T758947,
FACT_2 T758957
where ( T758944.DIM_1_KEY = T758957.DIM_1_KEY and T758947.DIM_2_KEY = T758957.DIM_2_KEY )
group by T758944.NAME, T758947.NAME2),
SAWITH1 AS (select sum(T758950.AMOUNT) as c1,
T758944.NAME as c2
from
DIM_1 T758944,
FACT_1 T758950
where ( T758944.DIM_1_KEY = T758950.DIM_1_KEY )
group by T758944.NAME),
SAWITH2 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5

from
(select 0 as c1,
case when D1.c3 is not null then D1.c3 when D2.c2 is not null then D2.c2 end as c2,
D1.c2 as c3,
D2.c1 as c4,
D1.c1 as c5,
ROW_NUMBER() OVER (PARTITION BY D1.c2, case when D1.c3 is not null then D1.c3 when D2.c2 is not null then
D2.c2 end ORDER BY D1.c2 ASC, case when D1.c3 is not null then D1.c3 when D2.c2 is not null then D2.c2 end
ASC) as c6
from
SAWITH0 D1 full outer join SAWITH1 D2 On SYS_OP_MAP_NONNULL(D1.c3) = SYS_OP_MAP_NONNULL(D2.c2)
) D1
where ( D1.c6 = 1 ) )
select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3, D1.c4 as c4, D1.c5 as c5 from ( select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5
from
SAWITH2 D1
order by c1, c2, c3 ) D1 where rownum <= 500001
Physical Query when the level is left blank.
WITH
SAWITH0 AS (select sum(T758957.DISCOUNT) as c1,
T758944.NAME as c2,
T758947.NAME2 as c3
from
DIM_1 T758944,
DIM_2 T758947,
FACT_2 T758957
where ( T758944.DIM_1_KEY = T758957.DIM_1_KEY and T758947.DIM_2_KEY = T758957.DIM_2_KEY )
group by T758944.NAME, T758947.NAME2)
select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3, D1.c4 as c4, D1.c5 as c5 from ( select distinct 0 as c1,
D1.c2 as c2,
D1.c3 as c3,

cast(NULL as DOUBLE PRECISION ) as c4,


D1.c1 as c5
from
SAWITH0 D1
order by c2, c3 ) D1 where rownum <= 500001

You might also like