Decorators
Schema decorators allow you to customize how your graph appear within the mediarithmics platform interfaces, specifically the Advanced Segment Builder and the Query Tool.
By uploading a specific CSV file, you can "shallow-rename" fields (change their display label) or hide specific properties from users without altering the underlying technical schema.
Decorator CSV Format
Schema decorators are defined using a CSV file. Below are the specifications for the file format.
CSV Dialect Rules
Separator: Comma (
,)Quotes: Double quotes (
") must be used for strings that contain commas.
Columns Specification
The CSV must contain the following headers.
OBJECT_NAME
The name of the object (resource) where the property is located.
FIELD_NAME
The original technical name of the property to decorate.
HIDDEN
true or false. Indicates if the field should be hidden from the UI.
LABEL
The user-friendly name to display in the Segment Builder and Query Tool.
HELP_TEXT
A short description displayed as a tooltip when hovering over the question mark (?) icon in the platform.
LOCALE
The locale for the label. Currently, this must be set to en-US.
Example
Code snippet
Managing Decorators
You can manage schema decorators either through the mediarithmics user interface (Navigator) or programmatically via the API.
Via User Interface
In the Datamart > Object View Configuration section of the Navigator Settings, you can use the buttons under the Schema to manage your CSV files directly.
The available actions are:
Upload new Decorators: Allows you to upload a prepared CSV file to apply new labels and visibility rules. This will overwrite existing decorators for this schema.
Download Template: Downloads a blank CSV file containing the required headers (
OBJECT_NAME,FIELD_NAME, etc.) to help you get started.Download Decorators: Downloads the current active decorator CSV file. This is useful if you want to make edits to the existing configuration.
Delete Decorators: Removes the current decorator file. The schema will revert to displaying raw technical field names, and hidden fields will become visible again.
Via API
Prerequisites
You will need the following values:
DATAMART_ID: The ID of your Datamart.SCHEMA_ID: The ID of the Schema you wish to decorate.MICS_API_TOKEN: Your API authentication token.
Retrieve Current Decorators
To fetch the existing decorator file for a specific schema:
Bash
Update Decorators
To upload a new decorator CSV file (replacing the existing configuration):
Bash
Last updated
Was this helpful?