MicroStrategy ONE
Renaming Objects in Your Project
Renaming objects in a project involves providing new strings for metadata object names and descriptions.
There are two methods to rename metadata objects, depending on whether you want to rename a large number of objects or just one or two objects:
- Rename a large number of objects: Extract strings in bulk to a separate database, rename them, and import them back into MicroStrategy. The MicroStrategy Repository Translation Wizard is the recommended method to rename your metadata objects. Steps to access this tool are below.
- Rename one or more objects in a folder: Right-click the object and select Translate. Type the new name(s) for each tenant language this object supports, and click OK. To rename several objects, select them all while holding Shift or Ctrl, then right-click and select Translate. For details to use the Object Translation dialog box, click Help.
The rest of this section describes the method to rename object strings in bulk, using a separate database, with the Repository Translation Wizard.
The Repository Translation Wizard does not support renaming of configuration objects (such as the user object). It does support object descriptors, including embedded text. These are detailed in the introduction to Renaming Metadata Objects.
Object renaming involves the following high-level steps:
All of the procedures in this section assume that your projects have been prepared for object renaming. Preparation steps are in Granting User Access to Rename Objects and View Tenant Languages.
- Add and enable tenant languages for the metadata repository (see Adding a New Tenant Language to the System and Enabling and Disabling Tenant Languages)
- Export object strings to a location where they can be renamed (see Extracting Metadata Object Strings for Renaming)
- Perform the renaming (see Renaming Objects in Your Project)
- Import the newly renamed object strings back into the metadata repository (see Importing Renamed Strings from the Database to the Metadata)
To allow users to rename objects using MicroStrategy's bulk translation tool, the Repository Translation Wizard, grant the user the Use Repository Translation Wizard privilege. If this privilege is assigned, be aware that the user will be able to export strings and import new names for those strings in all languages that the project supports. This is true no matter what other language restrictions are applied.
Extracting Metadata Object Strings for Renaming
The MicroStrategy Repository Translation Wizard supports Microsoft Access and Microsoft SQL Server databases as repositories where strings can be stored for renaming. The repository is where strings are extracted to and where the actual renaming process is performed.
You cannot extract strings from the project's default metadata language.
It is recommended that objects are not modified between the extraction process and the import process. This is especially important for objects with location-specific strings: attribute aliases, metric aliases, custom group elements, and document text boxes.
To Extract a Large Number of Object Strings for Renaming
- Open the Repository Translation Wizard. To do this, from the Start menu, point to All Programs, then MicroStrategy Tools, then select Repository Translation Wizard.
- Click Next to begin.
- To extract strings from the metadata, select the Export Translations option from the Metadata Repository page in the wizard.
Renaming Metadata Object Strings in the Database
The extraction process performed by the Repository Translation Wizard creates a table in the database, with the following columns:
- PROJECTID: This is the ID of the project from which the string is extracted.
- OBJECTID: This is the ID of the object from which the string is extracted.
- OBJECTTYPE: Each object is associated with a numeric code. For example, documents are represented by OBJECTTYPE code 55.
- EMBEDDEDID: An embedded object is an object contained inside another object, for example, a metric object that is part of a report object. If the string is extracted from an embedded object, the ID of this embedded object is stored in this column. The value 0 indicates that the string is not extracted from an embedded object.
- EMBEDDEDTYPE: This is a numeric representation of the type of the embedded object. The value 0 indicates that the string is not extracted from an embedded object.
- UNIQUEKEY: This is a key assigned to the extracted string to identify the string within the object.
- READABLEKEY: This is a description of the extracted string within the object, for example, Prompt Title, Prompt Description, Object Name, Template Subtotal Name, and so on. The READABLEKEY is a readable form of the UNIQUEKEY.
- LOCALEID: This indicates the tenant language of the extracted string in the TRANSLATION column.
- MicroStrategy uses locale IDs to uniquely identify tenant languages. MicroStrategy assigns a unique tenant language ID based on the base language that the tenant language is derived from.
- TRANSLATION: This is the column where the extracted string is stored.
- TRANSVERSIONID: This is the version ID of the object at the time of export.
- REFTRANSLATION: This column is used by translators. This column contains the extracted string in the translation reference language, which is selected by the user from the Repository Translation Wizard during export.
This string is used only as a reference during the translation process. For example, if the translator is comfortable with the German language, you can set German as the translation reference language. The REFTRANSLATION column will then contain all the extracted strings in the German language.
If no reference language string is available, the string from the object's primary language is exported so that this column is not empty for any string.
- STATUS: You can use this column to enter flags in the table to control which strings are imported back into the metadata. A flag is a character you type, for example, a letter, a number, or a special character (as long as it is allowed by your database). When you use the wizard to import the strings back into the metadata, you can identify this character for the system to use during the import process, to determine which strings to import.
For example, if only some objects have been renamed, you may want to import only the completed ones. Or you may wish to import only those strings that were reviewed. You can flag the strings that were completed and are ready to be imported.
- OBJVERSIONID: This is the version ID of objects at the time of import.
- SYNCHFLAG: This is a system flag and is automatically generated during import. The following values are used:
- 0: This means that the object has not been modified between extraction and import.
- 1: This means that the object has been modified between extraction and import.
- 2: This means that the object that is being imported is no longer present in the metadata.
System flags are automatically applied to strings during the import process, so that you can view any string-specific information in the log file.
- LASTMODIFIED: This is the date and time when the strings were extracted.
Once the extraction process is complete, the strings in the database need to be renamed in the extraction table described above.
- If an object name is empty in a user's chosen project language preference, the system defaults to displaying the object's default name, so it is not necessary to rename objects that are not intended to be renamed. For details on language preferences, see Selecting Preferred Languages for Interfaces, Reports, and Objects.
- If you performed a Search for Objects in the Repository Translation Tool, you may notice that the number of rows in the extraction table might not match the number of rows returned in the search results. This is because a search returns all objects that meet the search requirements; the search does not filter for only those items that can be renamed. Thus, for example, the search may return a row for the lookup table LU_YEAR, but the extraction process does not extract the LU_YEAR string because there is no reason to rename a lookup table's name. To determine whether an object's name can be renamed, right-click the object, select Properties, and look for the International option on the left. If this option is missing, the object is not supported for renaming.
To confirm that your new object names have successfully been imported back into the metadata, navigate to one of the renamed objects in Developer, right-click, and select Properties. On the left, select International, then click Translate. The table shows all names currently in the metadata for this object.
Importing Renamed Strings from the Database to the Metadata
After strings have been renamed in the database, they must be re-imported into the MicroStrategy metadata.
To Import Renamed Strings
- Open the Repository Translation Wizard. To do this, from the Start menu, point to All Programs, then MicroStrategy Tools, then select Repository Translation Wizard.
- Click Next to begin.
- To import strings from the database back into the metadata, select the Import Translations option from the Metadata Repository page in the wizard.
After the strings are imported back into the project, any objects that were modified while the renaming process was being performed, are automatically marked with a 1. These object names should be checked for correctness.