Showing posts with label Automate Generation of Repository Metadata. Show all posts
Showing posts with label Automate Generation of Repository Metadata. Show all posts

Thursday, August 20, 2015

AUTOMATE GENERATION OF REPOSITORY METADATA

Sometime back, I have posted on creating Catalog Metadata (GUI) and Repository Metadata (again GUI)
What if we have a way to automate this metadata. We code some lines, schedule it – simple!
The trick lies in using the /command switch of the AdminTool to run a script of commands.
Create a command script: BiCoach_RPDMetadata.build and put in the following few lines:
Replace MWHOME with local OBIEE installed path, BiCoach_repository with your own and the repository password with your own.
—-
OpenOffline
<MWHOME>\instances\instance1\bifoundation\OracleBIServerComponennt\coreapplication_obis1\repository\BiCoach_repository.rpd <repository password>
DescribeRepository D:\scriptoutput\BiCoachrepository_report.csv UTF-8
Close
Exit
—-
Now since we have to automate, lets create a script to run the AdminTool and pass in the script file created above.
—-
@echo off
set ORACLE_BI_APPLICATION=coreapplication
set JAVA_HOME=<MWHOME>\Oracle_BI1\jdk
set ORACLE_HOME=<MWHOME>\Oracle_BI
set ORACLE_INSTANCE=<MWHOME>\instances\instance1
call %ORACLE_INSTANCE%\bifoundation\OracleBIApplication\%ORACLE_BI_APPLICATION%\setup\user.cmd
set PATH=%ORACLE_HOME%\common\ODBC\Merant\5.3\Drivers;%ORACLE_HOME%\bifoundation\server\bin;%ORACLE_HOME%\bifoundation\web\bin;%ORACLE_HOME%\bin;%PATH%
<MWHOME>\Oracle_BI1\bifoundation\server\bin\AdminTool.exe /command d:\scripts\BiCoach_RPDMetadata.build
—-
Generated CSV file is what we are looking for. Go ahead and schedule this script in Windows Explorer.