Posted by : Arjun Lagisetty Thursday, October 20, 2016

Problem:

Have you ever had a problem when you accidentally changed something in an interface and you forgot what was changed. You wished you had a copy of yesterday's interface so you can restore from it or at the least compare the current interface to previous day's copy.

ODI developers typically use inconsistently internal versioning system to save versions of the code. All these versions are stored the master repository in blob format and litter the repository after a while. This method is also inconsistent, a developer might save an interface but he would have versioned data store used in that interface. Making copies of the objects is even more disastrous, it will make the repository horribly unreadable. Relying on DB backups will mean restore process is all or none. You cannot individually choose which objects to restore. Given these challenges we designed a process which does not involve developers intervention to backup the code nightly.


Solution:

I developed a package to export object by object in the development work repository for the following objects. This code is hosted here. This is scheduled every night. This process backs up the objects to an archive file and retains them for 28 days.


Note: 


  • This  code contains some Hard-coded values for directories. I am yet to make the code more parameter driven. Due to lack of time I am publishing the code as is. You need to make changes to the procedure named "PROC_OBJECT_BACKUP" 
  • This procedure is written for windows and uses 7zip to archive. 
  • Objects are created in the following format <Prefix>_<Object_ID>.xml. There was some error while using object names in the file names.
  • This uses Sunopsis memory engine's default physical schema. 


Object Type
Child Objects Yes/No
Prefix
PROJECT
No Child objects
PROJ
INTERFACES
With Child Objects
POP
PROCEDURES
With Child Objects
TRT
PACKAGES        
No Child Objects
PACK
VARIABLES
With Child Objects
VAR
USER FUNCTIONS
With Child Objects
UFUNC
MODELS
No Child Objects
MOD
SUB-MODELS
No Child Objects
SMOD
DATASTORE
With Child Objects
TAB

Potential uses: 

  1. These process can be used to restore the code if some developers accidentally corrupts the code. 
  2. We can modify this process to only extract changed objects nightly and check them into a version control system. 
  3. We can modify this process to extract objects based on tag for exporting for migration to another environment.


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Labels

Blog Archive

Copyright © ODI Pundits - Oracle Data Integrator - Maintained by Arjun Lagisetty