This section describes how to set up Metadata Server for use with SuperCROSS or SuperWEB2 (or both).
Metadata Server allows both SuperCROSS and SuperWEB2 to support multilingual datasets and tables; users will be able to change the dataset/table language by selecting from the menu options.
Metadata Server can also be used to add extra descriptive information (metadata) about a dataset and its fields. This can be displayed to users in SuperCROSS and SuperWEB2 (SuperWEB2 also has its own alternative system for showing additional information about tables and fields using static HTML pages).
There are a number of steps involved in setting up Metadata Server:
Step 1 - Create a Database
The first step is to create a new, empty, database in your chosen RDBMS. This will be used to store your metadata.
Create a new database. You do not need to create any tables in this database, as these will be created by the scripts you run in the next step.
The new database can have whatever name you like. For example, you might call it Metadata:
Create a dedicated database user account and set the account password.
- Grant your new user account full privileges over your new database.
You will also need a JDBC driver so that SuperSTAR can connect to your database for the initial setup. Download a suitable JDBC driver for your chosen relational database system.
|RDBMS||Recommended Driver||Example of JAR File||Driver Class||Download From|
|PostgreSQL||PostgreSQL JDBC driver||postgresql-8.2-506.jdbc4.jar||org.postgresql.Driver||https://jdbc.postgresql.org/download.html|
|SQL Server||Microsoft JDBC Driver||sqljdbc4.jar||com.microsoft.sqlserver.jdbc.SQLServerDriver||https://www.microsoft.com/en-au/download/details.aspx?id=11774|
|Teradata||Teradata driver||terajdbc4.jar and tdgssconfig.jar||com.teradata.jdbc.TeraDriver||http://www.teradata.com/downloadcenter/|
Step 2 - Edit and Run the Configuration Scripts
SuperSTAR is supplied with some configuration files for setting up metadata. You need to edit these files to suit your system.
The first file you need to modify is a windows batch file called BuildMetadataTemplate.bat. In a default installation, this file is located in C:\ProgramData\STR\SuperADMIN\MetaData\MetaDataUtilities
This is a script that will connect to both SuperSTAR and your new metadata database. It copies the structure of the SuperSTAR dataset to your metadata database, ready for you to start populating it with your metadata.
Open BuildMetadataTemplate.bat in a text editor.
At the top of the file there are a number of lines that define various parameters the script will use. You need to modify the following lines to provide the appropriate details for your system:
|Locate the Following Line:||Make This Change:|
Add the details of the JDBC database driver to use to connect to your database. For example:
Add the full path to the location of the database driver (jar file) on your system. For example:
Add the connection string the script will use to connect to your metadata database. For example:
Replace the server and user details with the appropriate values for your system.
In these examples:
Add a repository ID. This is an ID that you will use later on to connect the SuperSTAR Metadata Server to your database. It does not have to match the name of the database; it is just a text string that you will use later.
You can also make the following changes if you wish, or just leave these parameters set to the default values:
|Specifies the maximum number of rows to write to each table in the metadata database. To specify no limit, set this to -1. Or leave it set to 20 (the default value).|
|Specifies whether or not to overwrite the metadata database if it already exists.|
|Specifies whether or not to export the classification table data to CSV (Comma Separated Values) files.|
When you have finished, save your changes to BuildMetadataTemplate.bat.
This is a text file that specifies which SuperSTAR datasets you want to create metadata for. In a default installation, this file is located in C:\ProgramData\STR\SuperADMIN\MetaData\MetaDataUtilities
You can either create this file manually or use the
createdatabaselist command in SuperADMIN.
The dataset list file must use the following format (if you use the SuperADMIN command it will generate a list of all of your SuperSTAR datasets in this format):
|The ID of the dataset in the SuperSTAR catalogue.|
|The dataset display name from the SuperSTAR catalogue.|
|The full path to the .sxv4 file that contains the dataset but without the .sxv4 file extension.|
For example, the shipped databases.txt file is as follows. This would instruct the batch process to create metadata tables and columns for the sample People and Retail Banking datasets:
When you have finished editing databases.txt, save the file.
The next step is to edit metacolumns.txt. In a default installation, this file is located in C:\ProgramData\STR\SuperADMIN\MetaData\MetaDataUtilities
Every classification and fact table in your SXV4 datasets will have a corresponding table created in the metadata database. metacolumns.txt specifies what columns need to be created in each one of these metadata tables. For each language you want to support you need one column that stores the translated name of the field or field value and one column that stores the translated description.
Each line in the file defines a column to create in the metadata database table, in the following format:
The name of the column to create
You can chose whatever name you like for the column. The column name is not displayed to end users in the clients, but you will see this in the RDBMS when you are populating your metadata, so you should choose something that will make it easy to remember which column is which (for example,
The language code.
You must use either the two character ISO 639-1 language code (for example,
The column type, which must be one of the following:
|The maximum length of the column (in characters).|
For example, the following sample will create columns for storing English and French metadata with up to 250 characters in the translated names and up to 500 characters in the descriptions:
The columns will be created in the metadata database in the same order as they are listed in metacolumns.txt, and the original field names from the dataset will automatically be populated into the first column listed in metacolumns.txt.
For this reason, you should make sure that the first column listed in metacolumns.txt is the name column for the original language of the dataset you are creating metadata for. In this example, the original dataset language is English, so the
en_name column is listed first. If the dataset was in French, then
fr_name should be the first column instead.
When you have finished editing metacolumns.txt, save your changes to the file.
Once you have finished editing all three files, run the configuration batch file:
- Open a Windows Command Prompt and change to the directory where the batch file is located (if you installed to the default location, this will be C:\ProgramData\STR\SuperADMIN\MetaData\MetaDataUtilities).
- Run BuildMetadataTemplate.bat. It will use the information from your SuperSTAR datasets to create your metadata database tables.
- Wait for the process to complete and advise that it has "Finished populating RDBMS":
Check your metadata database to confirm that the script has created the tables for all of the fact and classification tables in all of your chosen SuperSTAR datasets:
There should be one new table for every classification and fact table in your source datasets.
You can also check the individual tables. The script should have created each table with the columns you specified in metacolumns.txt. The original (untranslated) field names from the dataset will be in the first column that was specified in metacolumns.txt:
Step 3 - Create the Keyword Table
You need to manually create and populate an additional table in the metadata database that is not created by default. This table (
keyword) stores translations for certain keywords used in SuperCROSS and SuperWEB2, such as "and", "by", "count", "mean" and "median".
- Create a table in your metadata database called
Create the following columns in the table:
This column will contain the untranslated keyword codes.
These columns will contain the translated keywords for each language.
You will need to create one
<lang>_namecolumn for each language you want to support. Replace
<lang>with the two character language code.
Populate the table with the keywords and their translations. See Reference for a full list of keywords/codes that need to be translated.
Step 4 - Create the Folders Table
If you want to translate the names of folders you have created in SuperADMIN, then you will need to create an additional table to store the translated folder names:
- Create a new table in your metadata database. You can give this table whatever name you like. For example, you might call it
Create the following columns in the table:
This column will contain the SuperADMIN IDs of the folders that you want to translate.
These columns will contain the translated folder names for each language.
<lang>_namecolumn for each language you want to support. Replace
<lang>with the two character language code.
Populate the table with the folder IDs and their translations. For example:
- Open the
<repository_id>is the repository ID you chose when you configured BuildMetadataTemplate.bat).
This table will contain a single record. You need to update the record to add the name of the folders table you just created to the
ss_fldrcolumn. This will tell the Metadata Server where to find your translated folder names. For example:
Step 5 - Configure the Metadata Server
The next step is to configure the SuperSTAR Metadata Server.
Before starting the Metadata Server, you need to change some configuration settings in Metadata Server's metadata.config.xml. In a default installation, this file is located in C:\ProgramData\STR\SuperSERVER SA
Open metadata.config.xml in a text editor.
Locate the Driver section of the file and edit the ConnectionString to match the details of your connection to the database, as follows:
- DSN is the Data Source Name that you specified when you set up the ODBC driver to your database (e.g. obdc_metadata).
- REP is the repository ID that you set in BuildMetadataTemplate.bat (e.g. metadatadbid).
- UID and PWD are the username and password to use to connect to the database.
- STRSCHEMA is optional. You can use this to specify a schema name for relational databases that require a table name qualification (for example, DB2). If the schema is specified it will be used to qualify the table names that are used by the ODBC layer. If this does not apply to your database, omit the STRSCHEMA parameter.
You should also confirm that the SuperADMINConnection details are correct for your environment:
When you have finished making changes, save metadata.config.xml.
Step 6 - Start the Metadata Server Application
By default the Metadata Server is not started and you must start it manually. Metadata Server will need to be running at all times, so when you have finished the configuration and setup, you may wish to use SuperSERVICE Manager to create a service that automatically starts Metadata Server when SuperSERVER starts.
To start Metadata Server manually, go to the Windows start menu and select SuperSTAR > SuperSERVER SA > Metadata Server SA.
Metadata Server will start and advise that it is connected to SuperADMIN:
Step 7 - Change your SuperSERVER Datasets and Folders to be Multilingual
By default, your SuperSERVER datasets and folders do not connect to Metadata Server. To change this, you need to set the
multilingual flag to
true in SuperADMIN for every dataset and folder that you want to use with Metadata Server:
- Login to SuperADMIN.
For each dataset that you want to use with Metadata Server, you must run the following command at least once before changing the
This primes the SuperADMIN catalogue with the list of display names of fields for this dataset in the original dataset language. Doing this ensures that the field names continue to be displayed in SuperADMIN in this language. If you do not do this before changing the dataset to be multilingual, then SuperADMIN will display multilingual field codes for this dataset instead (which will be similar to the following:
Use the following command to change the
Step 8 - Configure SuperCROSS
If you are using the SuperCROSS client, you need to make several configuration adjustments.
Configure the Client
By default, SuperCROSS is not configured to use Metadata Server. When you start SuperCROSS after making the change in SuperADMIN you will see symbols like ## in the dataset listing:
You need to change a configuration setting in SuperCROSS to enable the use of the Metadata Server:
- Start SuperCROSS and open any dataset or table.
- Select Edit > Options. The Options window displays.
- Select the Configuration tab and click Metadata.
Change Disabled to Enabled and click OK.
- Restart SuperCROSS to apply the change.
Configure SuperCROSS Languages
If you are using metadata to enable multilingual tables, then you need to edit the language definitions in the SuperCROSS metadata configuration file, metadata.config.xml. In a default installation, this file is located in C:\ProgramData\STR\SuperCROSS.
Open the SuperCROSS metadata.config.xml file in a text editor, and locate the language map section, which will be similar to the following:
This section lists all the available languages that can appear in the File > Table Language menu in SuperCROSS.
A language will appear in that menu and be available for the user to select if both of the following are true:
- The language is listed in the language map section of the SuperCROSS metadata configuration file.
- Columns for the language exist in the metadata database.
Update this section so that it includes a
<STRING> element for each language that you have set up in your metadata database.
- Use the
nameparameter to specify the language code that you used in metacolumns.txt when you set up your metadata database.
- Use the text within the
<STRING>element to control the text that will be displayed on the menu in SuperCROSS.
The supplied version of metadata.config.xml has all the language names in English. You may wish to change these so that the language names are in the individual languages, and show the English language name in brackets. For example:
When you have finished making changes, save and close metadata.config.xml.
You are also recommended to make a change to one of the SuperCROSS configuration files. There are two changes you should make:
Disable the Create Table Metadata window. If you do not make this change, SuperCROSS displays a window similar to the following when you click on a dataset name:
Disable the ability to edit metadata in SuperCROSS. By default users can edit metadata in SuperCROSS; their edits are not sent back to the Metadata Server, but an XML file containing the user's edited metadata will be saved alongside the table when it is saved.
You are particularly recommended to make this change if you will be creating TXD files in SuperCROSS for use in SuperWEB2. SuperWEB2 does not support saved TXD files with metadata edited in SuperCROSS.
To make these changes, you need to edit the file super.ini. In a default installation this file is located in C:\ProgramData\STR\SuperCROSS.
- Make sure that SuperCROSS is not running.
- Open super.ini in a text editor.
Search for the
Set the value of
0to prevent users from editing metadata in SuperCROSS, and set the value of
1to turn off the Create Table Metadata window:
- Save and close super.ini.
Step 9 - Create and Verify the actual Metadata values
Now that metadata is configured, you can edit your actual metadata values in the database. Simply add the relevant descriptions and translations.
The following examples show some ways you can use metadata.
Example: Adding a Description
The following screenshot from SQL Server shows some additional information added to the description field for one of the values of Occupation:
You can view this information in SuperCROSS by right-clicking the value and selecting Meta-Information > Value.
Example: Adding Multilingual Metadata
The following screenshot from SQL Server shows the addition of some French translations:
In SuperCROSS, you can use the File > Table Language menu to change the table language:
In SuperWEB2, you can use the option on the menu to select the dataset language: