AVIO Insights

Oracle ODI 11g Scenario Exports Made Easy

It is a common practice within ODI to export ODI Packages, Interfaces, Procedures, Variables, Scenarios, and other artifacts. You always have the option to go to ODI Studio and manually right click on each artifact and click export, but it can get pretty hairy and time consuming if you have more than a handful of them. Add to that, if you are exporting ODI Scenarios to be deployed to another environment, you have to regenerate them before exporting. So now, you also have to individually regenerate every Scenario before individually exporting them. Now also add to that, you are in a software development life-cycle in which you have to constantly import and export Scenarios from one environment to another, and it can take considerable amount of your time in doing all this manually and individually for each Scenario.

Luckily for us, Oracle ODI's Toolbox provides us the ability to regenerate and export Scenarios. Utilizing those 2 features provided by the ODI Toolbox, I was able to create a separate ODI project to handle my exports. In my case, I had 30+ ODI Packages and some 10+ Procedures that I needed to be migrated to ODI Execution Repository environments. As you probably already know, on an ODI Execution Repository, you can only import Scenarios.

1) I started out by creating a separate ODI project called "Maintenance" to do the migrations.

2) To keep things organized, within this project I created a separate Package for each of my other ODI projects. For example, say I had 3 ODI projects: Project X, Y, and Z that had my 30+ Packages and 10+ Procedures that needed to be migrated. I created 3 Packages called "Export_X", "Export_Y", and "Export_Z" within the "Maintenance" project. Each of these Packages had 3 steps (these steps might vary for you depending on what you are exporting). In my case, I wanted to export all my Package Scenarios and some of my Procedure Scenarios. The 3 steps shown below were repeated for Project Y in "Export_Y" and Project Z in "Export_Z".

The first step was to regenerate the Scenarios for all my Packages within Project X, since only Scenarios can be imported to ODI Execution Repository. Using the OdiGenerateAllScen feature from the Toolbox, I regenerated all my Package Scenarios:

The second step was to regenerate Scenarios for some of my Procedures within Project X, since only Scenarios can be imported to ODI Execution Repository. Using the OdiGenerateAllScen feature from the Toolbox and using the Marker feature, I regenerated only the Procedure Scenarios that I have marked "P":

And the third step was to export the regenerated Scenarios from the two steps above for Project X. Using the OdiExportScen feature from the Toolbox, I exported the regenerated Scenarios from the first two steps:

3) After creating the three Packages and their corresponding Scenarios, I created a master Package "Export_All". Using the OdiStartScen feature from the Toolbox, I included these three Package Scenarios to this master Package:

4) When ODI Scenarios needed to be exported, I just executed the "Export_All" Package from ODI Studio.

Creating the "Maintenance" project to manage my Scenario migrations helped me in two primary ways:

1) Eliminated the human error of forgetting to regenerate and/or export a specific Scenario.

2) Saved a considerable amount of time in the development life-cycle.

Please feel free to leave me a comment if you have any questions.

2 minute read