Creating a level for the relational dimension

A level called Line is created for the relational dimension. In addition, attributes Product Line Code and Product Line En are created for the level.

Creating a level - Line

The level command creates a level called Line. The identifier contained in the response is used in subsequent commands to refer to the level.

Input JSON data
{
  "parent": "<idDimension>",
  "name": [
    {
      "locale": "en",
      "text": "Line"
    }
  ]
}
Output JSON data
{
  "id": "<idLevel>"
}
  

Creating an attribute - Product Line Code

The query_item command creates an attribute called Product Line Code for the Line level. The identifier contained in the response is used in subsequent commands to refer to the attribute.

Input JSON data
{
  "parent": "<idLevel>",
  "usage": "identifier",
  "datatype": "int32",
  "isLevelKey": "true",
  "scale": "0",
  "parent": "<idLevel>",
  "name": [
    {
      "locale": "en",
      "text": "Product Line Code"
    }
  ],
  "precision": "10"
}
  
Output JSON data
{
  "id": "<idProductLineCode>"
}
  

Creating an attribute - Product Line En

The query_item command creates an attribute called Product Line En for the Line level. The identifier contained in the response is used in subsequent commands to refer to the attribute.

Input JSON data
{
  "parent": "<idLevel>",
  "size": "30",
  "usage": "identifier",
  "datatype": "nVarChar",
  "name": [
    {
      "locale": "en",
      "text": "Product Line En"
    }
  ]
}
  
Output JSON data
{
  "id": "<idProductLine>"
}
  

Creating the member caption role for Product Line En

The query_item_role command creates the member caption role for the Product Line En attribute.

Input JSON data
{
  "parent": "<idProductLine>",
  "name": [
    {
      "locale": "en",
      "text": "_memberCaption"
    }
  ]
}
  
Output JSON data
{
  "id": "<query_item_role>"
}