Renaming Subject Areas in Oracle Analytics

February 17, 2024 | 4 minute read
Anitha Ramarao
Consulting Solutions Architect
Amarpreet Nagra
Principal Member of Technical Staff, Analytics Customer Excellence
Text Size 100%:

Over time, business requirements evolve, which can affect how an Oracle Analytics subject area is defined. It may be significantly different from its initial state. To address these requirements and enhance your users' experience, you may need to rename the Oracle Analytics subject area.

Changing the subject area name is easily achievable in the presentation layer in the repository (.rpd) or the semantic model. The old name will be retained as an alternate name in the Oracle Analytics semantic model and as an alias in the RPD. This change is reflected immediately in new reports, which will be based on the updated subject area. However, old reports will still reference the previous subject area name.

As time passes, the meaning of the old name may fade, making it challenging for administrators to determine the prior subject area from logs or error messages. To maintain synchronization, administrators should consider updating all old subject area references in the catalog.

Other use cases include migrating from a data modeler to a semantic model. During migration, the display name of the subject area in the data modeler becomes the name of the subject area, and the subject area name of the Data Modeler will be added as an alternate name for the subject area in sematic model.

The image displays the alternative name added for this SampleApp subject area in the semantic model after the migration. 

You can achieve this name change using the Runcat command. Runcat possesses allows administrators to replace the subject area name. The command requires an XML input file with the following syntax, where you need to provide both the old and new values for the subject area:

Note: Oracle recommends placing PC11 before PC1. Otherwise, PC11 might end up getting renamed with the value of PC1 to “SampleApp1”.

To make the change, as an administrator, you need to execute the following command while passing in the XML input file:

runcat.sh -cmd replace -inputFile /u01/workDir/replaceCmds.xml -online <Oracle Analytics url> -credentials <credentials properties file>

NOTE: for credentials, create a text file that contains the login details for the Oracle Analytics environment. The file contains only these two values:

login=UserName

pwd=Password

Oracle highly recommends that you run the regression tests on reports and analysis thoroughly on lower environments before implementing these changes in the production catalog.

If you’re using the Semantic Modeler and would like to rename the subject areas in the report XML from an alternative name to a new name, you can leverage the following Python script. The script does these two things:

  1. It generates an input XML file based on the semantic model provided during the execution. 
  2. It then runs the runcat command to update the report XML with the new name.

Disclaimer - This script is provided as an example, and its use is at your discretion.  Oracle cannot guarantee its execution or support its output in your environment.

  1.  Sign in to into Oracle Analytics 

    In the left navigation pane, click Semantic Models to open it.
  2. Once the model is open, click the three dots in the top right corner and select Export.
  3. Save the zip file locally.

Modify and Execute the Script

You can download the script from this Oracle Community post.

Disclaimer - This script is provided as an example, and its use is at your discretion.  Oracle cannot guarantee its execution or support its output in your environment.

#location for runcat.sh/cmd

catalogPath='/u01/AdminTool/bi/bitools/bin'

#OAC URL WebSerivce URL - https://xxxx-yyyy-ia.analytics.ocp.oraclecloud.com/analytics-ws

oacURL="https://oac2-env-region.analytics.ocp.oraclecloud.com/analytics-ws"

#OAC LOGIN - details

userName="user.name@company.com"

password="Password"

#Provide a path for SME Zip file

smodel='/u01/dir/SME.zip'

#This is where SME will be extracted.

workDir='/u01/dir/WorkDir

 

Requirements:

  • PYTHON 3.6
  • Oracle Analytics Client Tools

Download the Oracle Analytics Client Tools for Windows and Linux from Analytics Client Tools for OAC.

Before executing the script, you’re recommended to create a backup BAR file. After the script is updated, execute it using Python. If an administrator wants to review the XML file that is created by the script, then as a user, you can enter “no” when prompted.

After reviewing the XML file, the administrator can copy the command displayed at the end script execution and execute it manually.

If you’ve entered “yes” when prompted, then the script will start making catalog changes in online mode and modify the report xml files.

Call to Action

Follow the guidance in this article to rename a subject area across Oracle Analytics to maintain consistency and to meet your business requirements. For more information on data model migration in Oracle Analytics, see the Oracle Help Center for Oracle Analytics Cloud.

Anitha Ramarao

Consulting Solutions Architect

Doug Marshik

Amarpreet Nagra

Principal Member of Technical Staff, Analytics Customer Excellence