An alternate way of updating the RPD manually is to script it with an XML patch file.
During an update, if an attribute is not present in the patch file, the patch process will take the default value on creation, not the actual one. Therefore, you need to create a patch with all attributes present.
In this approach, you don‟t need to open the RPD through an Admin tool. Instead, the values of the variables will be set in an XML file and then these values will be updated in the RPD by running a command line utility.
Patch File Syntax
The patch file contains only the delta of the changes between the current and original versions.
Example with the xudml format.
Most of the object have as identifier:
- the tag name
- the name attribute.
- and a parentName attribute if the object belongs to a tree structure.
To update the values of variable from the sample application, you can use the below XML where:
- The declare node instruct to create or update the repository
- The variable tag identify the object type as variable
- The name attribute identifies the name of the variable.
<?xml version="1.0" encoding="UTF-8" ?> <Repository xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DECLARE> <Variable name="BI_EE_HOME" > <Description><![CDATA[This path should be the path of your OBIEE install]]></Description> <Expr><![CDATA['UPDATE - BI_EE_HOME_PATH']]></Expr> </Variable> </DECLARE> </Repository>
To update connection pool parameters such as name, dsn.
The name and parentName attribute are mandatory.
Becareful, this patch does not have all attributes present. This is a bad practice as the missing attributes such as max connection (maxConn) will be set to the default value which is 0. :(
<?xml version="1.0" encoding="UTF-8" ?> <Repository xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DECLARE> <ConnectionPool name="CONNECTION_POOL_NAME" parentName=""DATABSE_NAME"" user="USERNAME" dataSource="DSN_NAME" > </ConnectionPool> </DECLARE> </Repository>
Create Patch feature
You can apply a patch to the original file using the following tool
|biserverxmlexec with the -B option (offline)||Update/Create|
|OBIEE - biserverxmlcli (online Modifications) (online)||Update / Create ?|
|The patch merge feature in the Administration Tool||merge|
|The patchrpd utility (perform a merge)||merge|
Example with biserverxmlexec, to perform only an update (ie no orginal repository is needed)
biserverxmlexec -P repository_password –I xudml_patch_pathname –B base_repository_pathname –O output_repository_pathname
Example of parameter values from the sampleApp installation:
- -P Admin123
- -I SampleApp_Patch.xml
- -B SampleApp.rpd
- -O SampleApp.rpd
The validaterpd utility can help validate that the patching process didn't break the repository file.