Analytics Resources: Insights, Best Practices,

Case Studies and More

close
Written by Dang Trung Tin
on April 29, 2017

tracey_good_data_housekeeping.jpg

 

For one of my projects we ran into an issue with constantly running out of tablespace for the ODI metadata tables. Instead of constantly increasing the operator logs I figured it is a better option to purge the logs periodically. This blogs walks through the steps on how to achieve that. 

 To purge the ODI operator logs we can create a new ODI package to purge the operator logs. 

 

Step 1:  Define the variable to hold the dates to be purged from 

From Designer tab in ODI Studio, navigate to Projects > BI Apps Project > Variables. Then right click to create new variable called END_DATE_FOR_PURGE as below.

 

Picture1.png

 

Choose Date as data type for this variable.

 

Picture2.png

 

Click on Refreshing tab, then select schema DW_BIAPPS11g and enter the query as below.

SELECT SYSDATE-30 FROM DUAL

Picture3.png

 

Click on Save icon on the left corner of ODI Studio.

 

 

Step 2:  Define the mapping to use this variable to purge

Now navigate to Projects > Mappings > Custom_SILOS. Right click to create New Sub-Folder called ODIpurgelog and then click Save icon on left corner.Open ODIpurgelog folder and right click on Packages to create new ODI package called ODIpurgelog. Click on Diagram tab of the package. Drag & Drop END_DATE_FOR_PURGE variable to package diagram.

 

Picture4.png

 

 

In diagram, insert OdiPurgeLog object and design package as shown below.

 

Picture5.png

 

Click on Odi PurgeLog 1 and change configuration of this object as bolow.

Purge Type: All
End Date: #END_DATE_FOR_PURGE
Purge Reports: Yes
Archive Purged Objects: No

Picture6.png

Click save and right click on the new created package and select execute to purge ODI Operator log.

 

Picture7.png

 

Deending on the size of the current operator log it might take a few hours to purge the log initially. 

 

Picture8.png

 

Step 3:  Scheduling the ODI operator log purging

Right click on ODIpurgelog package and select Generate Scenario to generate scenario for this package. 

 

Picture9.png

 

Navigate to Load Plans and Scenarios > Generated Load Plans. Right click to create new load plan called ODI Purge Log.

 

Picture10.png

 

Drag & Drop new scenario created above to the new load plan as shown below. Change Restart behavior to Restart from failed step and change Scenario version to -1.

 

Picture11.png

 

 

Click Save icon on the left corner of ODI Studio.

Right click on ODI Purge Log load plan and select New Scheduling.

 

Picture12.png

 

Configure the scheduling for this load plan as shown below. Then click Save icon on the left corner of ODI Studio.

 

Picture13.png

 

Go to Topology tab. Right click on OracleDIAgent and select Update Schedule.

 

Picture14.png

 

The schedule should be updated successfully.

 

If you want to discuss how to use this functionality or in general how to leverage on your BICS investment please feel free to contact us. 

 

Sure, I want to know more

You may also like:

Business Intelligence PowerBI PowerBI Dashboard Power BI Tips and Tricks

How to Display Last N Months Data in Power BI

One way to measure your business performance is by retracing your data during a period of time. In Power BI, this can be...

Business Intelligence PowerBI PowerBI Dashboard Power BI Mobile Power BI Tips and Tricks

3 Tips for Optimised Mobile Power BI Dashboard

With Power BI Mobile, users can access their reports and dashboards on the go. However, sometimes mobile view layout is ...

Business Intelligence PowerBI PowerBI Dashboard Aviation Airline Analytics

Airline Analytics: How Analytics Can Transform the Aviation Industry

Technology is changing how businesses are conducted across several sectors and industries. This also affects how busines...