Creating physical tables and joins

Three physical tables, PRODUCT_LINE, PRODUCT_TYPE, and PRODUCT are created. In addition, joins are established between the PRODUCT_TYPE and PRODUCT_LINE tables, and between the PRODUCT_TYPE and PRODUCT tables.

Creating a physical table - PRODUCT_LINE

The physical_table command creates a physical table called PRODUCT_LINE. The identifier contained in the response is used in subsequent commands to refer to the physical table.

Input JSON data
{
  "parent": "<idDimension>",
  "datasource": "<idDataSource>",
  "name": "PRODUCT_LINE"
}
  
Output JSON data
{
  "id": "<idTableLine>"
}
  

Creating a physical table - PRODUCT_TYPE

The physical_table command creates a physical table called PRODUCT_TYPE. The identifier contained in the response is used in subsequent commands to refer to the physical table.

Input JSON data
{
  "parent": "<idDimension>",
  "datasource": "<idDataSource>",
  "name": "PRODUCT_TYPE"
}
  
Output JSON data
{
  "id": "<idTableType>"
}
  

Creating a physical table - PRODUCT

The physical_table command creates a physical table called PRODUCT. The identifier contained in the response is used in subsequent commands to refer to the physical table.

Input JSON data
{
  "parent": "<idDimension>",
  "datasource": "<idDataSource>",
  "name": "PRODUCT"
}
  
Output JSON data
{
  "id": "<idTableProduct>"
}
  

Creating a physical join - PRODUCT_TYPE to PRODUCT_LINE

The physical_join command creates a physical join between the PRODUCT_TYPE and PRODUCT_LINE tables. The identifier contained in the response is used in subsequent commands to refer to the physical join.

Input JSON data
{
  "parent": "<idDimension>",
  "leftMaxCardinality": "one",
  "rightTable": "<idTableType>",
  "leftMinCardinality": "one",
  "rightMaxCardinality": "many",
  "leftTable": "<idTableLine>",
  "rightMinCardinality": "one",
  "name": "FK_PRODUCT_TYPE_PRODUCT_LINE"
}
  
Output JSON data
{
  "id": "<idJoin>"
}
  

The physical_association command creates a physical association.

Input JSON data
{
  "parent": "<idJoin>",
  "rightColumn": "PRODUCT_LINE_CODE",
  "operator": "equals",
  "leftColumn": "PRODUCT_LINE_CODE"
}
  
Output JSON data
{
  "id": "<physical_association>"
}
  

Creating a physical join - PRODUCT_TYPE to PRODUCT

The physical_join command creates a physical join between the PRODUCT_TYPE and PRODUCT tables. The identifier contained in the response is used in subsequent commands to refer to the physical join.

Input JSON data
{
  "parent": "<idDimension>",
  "leftMaxCardinality": "one",
  "rightTable": "<idTableProduct>",
  "leftMinCardinality": "one",
  "rightMaxCardinality": "many",
  "leftTable": "<idTableType>",
  "rightMinCardinality": "one",
  "name": "FK_PRODUCT_PRODUCT_TYPE"
}
  
Output JSON data
{
  "id": "<idJoinProduct>"
}
  

The physical_association command creates a physical association.

Input JSON data
{
  "parent": "<idJoinProduct>",
  "rightColumn": "PRODUCT_TYPE_CODE",
  "operator": "equals",
  "leftColumn": "PRODUCT_TYPE_CODE"
}
  
Output JSON data
{
  "id": "<physical_association_2>"
}