Bulk upload valid intersections in PBCS


Well with all good things (and bad) there is a beginning and for this one I can point out where it started 🙂

There was this question on Network 54 which was a definite fit for Valid Intersections. However the unfortunate thing about it is “Valid Intersection is not available on on-prem”, “No automated way to bulk import Valid Intersection”.

1. Not being available – can’t do anything about it.
2. Where it is available, there is no good way to bulk load them.

So how can I bulk load valid intersections in PBCS.

Maybe I play around with LCM a lot and I love doing what I do. (You need to be careful with what you are doing, all I’m saying is that).

Sharpen your command lines skills and get the below given free utilities, oh you are going to love them.

Bulk Rename Utility


This is a file renamer tool. Why you need a file renamer – good question. If you look at the LCM files, you’ll see that


Valid intersections (not only those, all artifacts), when exported will carry the same file name (.xml) and you need a file renamer to rename and load the new artifact.

You can download Bulk Rename Utility from here. There is a command line version and a UI version, for this exorcise we are using the command line version.

The second one is Find and Replace tool (fnr)



Well, there are other tools out there which can do it (like Notepad++, open all artifacts and do a find and replace on all open documents), what I like about this one is it can do recursive find and replace, comes with a UI and command line. You can download fnr from here.

Step 2

Perform a LCM of one valid intersection, the one which you can perform find and replace and create a new one.


Step 3

I’ve created a bat file to perform, download of the snaphot, perform, find and replace, upload the file and do execute LCM.


This is all for Valid Intersections and PBCS, however can be replicated for any artifacts. Also same can be used in on-prem (You’ll have to use Utility.bat for Export and Import).

Here is the bat file for doing all the above mentioned process.

SET EPMAUTOMATEHOME=C:OracleEPM Automate  
REM -- here is where LCM will be downloaded 
cd /d D:ValidIntersections 
call "%EPMAUTOMATEHOME%binepmautomate.bat" login serviceAdmin P@ssword1 https://test-cloud-pln.pbcs.us1.oraclecloud.com myIdentityDomain 
call "%EPMAUTOMATEHOME%binepmautomate.bat" downloadfile "Other Assumptions - RC3"  
REM --- first valid intersection for RC4 
REM --- I'm using GnuUtils version of zip, you could use 7zip 
unzip "Other Assumptions - RC3.zip" -d "Other Assumptions - RC3"  
REM -- call bulk rename for renaming files 
call "C:UsersckattookaranDocumentsPortable_AppsPortableAppsBulk Rename UtilityBRC64.exe" /DIR:"D:ValidIntersectionsOther Assumptions - RC3" /RECURSIVE /EXECUTE /REPLACECS:RC3:"RC4"  
REM -- call fnr for replacing inside files 
"C:UsersckattookaranDocumentsPortable_AppsPortableAppsFind And ReplaceFind And Replace.exe" --cl --dir "D:ValidIntersectionsOther Assumptions - RC3" --fileMask "*.*" --excludeFileMask "*.dll, *.exe" --includeSubDirectories --caseSensitive --useRegEx --find "RC3" --replace "RC4"  
REM -- navidate inside the directory for zipping the files and upload 
cd /d "Other Assumptions - RC3" 
REM -- copy the .prefs file, so that you don't need to login to PBCS again 
copy /Y D:ValidIntersections.prefs "D:ValidIntersectionsOther Assumptions - RC3" 
REM -- zip the files (-x is done to exclude .prefs file) 
zip -r "Other Assumptions - RC4.zip" *.* -x".prefs"  
REM -- upload file to PBCS 
call "%EPMAUTOMATEHOME%binepmautomate.bat" uploadfile "Other Assumptions - RC4.zip" 
REM -- run LCM 
call "%EPMAUTOMATEHOME%binepmautomate.bat" importsnapshot "Other Assumptions - RC4"  
REM -- come out of the directory and delete the directory, this is done so that you can replicate the steps for next fnr 
cd ..// RD /Q /S "Other Assumptions - RC3"  
REM --- second valid intersection for RC5 
unzip "Other Assumptions - RC3.zip" -d "Other Assumptions - RC3" 
call "C:UsersckattookaranDocumentsPortable_AppsPortableAppsBulk Rename UtilityBRC64.exe" /DIR:"D:ValidIntersectionsOther Assumptions - RC3" /RECURSIVE /EXECUTE /REPLACECS:RC3:"RC5" 
"C:UsersckattookaranDocumentsPortable_AppsPortableAppsFind And ReplaceFind And Replace.exe" --cl --dir "D:ValidIntersectionsOther Assumptions - RC3" --fileMask "*.*" --excludeFileMask "*.dll, *.exe" --includeSubDirectories --caseSensitive --useRegEx --find "RC3" --replace "RC5"  
cd /d "Other Assumptions - RC3" 
copy /Y D:ValidIntersections.prefs "D:ValidIntersectionsOther Assumptions - RC3" 
zip -r "Other Assumptions - RC5.zip" *.* -x".prefs"  
call "%EPMAUTOMATEHOME%binepmautomate.bat" uploadfile "Other Assumptions - RC5.zip" 
call "%EPMAUTOMATEHOME%binepmautomate.bat" importsnapshot "Other Assumptions - RC5"  
cd ..// RD /Q /S "Other Assumptions - RC3"

I’ve added comments in the script itself to explain each step.


Run the batch and you’ll see that it did replace the files.

There you go, bulk upload of Valid Intersections 🙂

Advertisements

About Celvin Kattookaran

I’m an EPM Consultant, my primary focus is on Hyperion Planning and Essbase.

Some of you from Hyperion Support team might recognize me or have seen my support articles, I was with the WebAnalysis Support Team. I’m an Independent Consultant with “Intekgrate Corporation” based out of Aurora office.

I’m from God’s Own Country (Kerala, India), lived in all southern states of India, Istanbul and Johannesburg (and of course United States). I’m core gamer :) and an avid reader.

I was awarded Oracle ACE Director for my contributions towards EPM community.

Leave a Reply