ODI 11g – Scripting Repository Creation
Posted
by David Allan
on Oracle Blogs
See other posts from Oracle Blogs
or by David Allan
Published on Wed, 20 Jun 2012 16:11:19 +0000
Indexed on
2012/06/20
21:20 UTC
Read the original article
Hit count: 636
/Oracle
Here’s a quick post on how to create both master and work repositories in one simple dialog, its using the groovy capabilities in ODI 11g and the groovy swing builder components. So if you want more/less take the groovy script and change, its easy stuff. The groovy script odi_create_repos.groovy is here, just open it in ODI before connecting and you will be able to create both master and work repositories with ease – or check the groovy out and script your own automation – you can construct the master, work and runtime repositories, so if you are embedding ODI as your DI engine this may be very useful.
When you click ‘Create Repository’ you will see the following in the log as the master repository starts to be created;
======================================================
Repository Creation Started....
======================================================
Master Repository Creation Started....
Then the completion message followed by the work repository creation and final completion message.
Master Repository Creation Completed.
Work Repository Creation Started.
Work Repository Creation Completed.
======================================================
Repository Creation Completed Successfully
======================================================
Script exited.
If any error is hit, the script just exits and prints any error to the log. For example if I enter no passwords, I will get this error;
======================================================
Repository Creation Started....
======================================================
Master Repository Creation Started....
======================================================
Repository Creation Complete in Error
======================================================
oracle.odi.setup.RepositorySetupException: oracle.odi.core.security.PasswordPolicyNotMatchedException: ODI-10189: Password policy MinPasswordLength is not matched.
======================================================
Script exited.
This is another example of using the ODI 11g SDK showing how to automate the construction of your data integration environment. The main interfaces and classes used here are IMasterRepositorySetup / MasterRepositorySetupImpl and IWorkRepositorySetup / WorkRepositorySetupImpl.
© Oracle Blogs or respective owner