Create a cube from a file

Modelers can create and populate a cube and its dimensions from a text file.

Note: If you create a new cube from a text file, you cannot include existing dimensions. All dimensions must be new.

Before you begin

You must be a member of the ADMIN group for the TM1 database to be able to import data into cubes. See Add users to user groups.

Your import data must be correctly structured and formatted to get the correct results, see Cube import file format.

Procedure

  1. In edit mode, go to the database in the Data tree where you want to create the cube.
  2. Right-click the database, then click Import data.
  3. Click the cubes list, and select New cube.
  4. Drag the source file onto the import area, or click the import area to browse for a file, then click Continue to import the file.

    A preview of the dimensions in the cube appears.

  5. Name the cube in the New cube name field.
    cube preview, showing dimensions, delimiter, quote character, and header rows
  6. Check that the Delimiter, Quote character, and Header rows values match what is in your import data file.
    If you change these values, click Refresh Refresh.
  7. Click Continue
  8. Name your dimensions in the Cube dimensions column.
    The order of dimensions in a cube can impact system performance. To learn more, see Ordering Dimensions in a Cube in the TM1 Developer documentation.
    The dimension name must be unique in the database.

    For example, an import file has three columns as shown in the following table.

    Products Branch Sales
    Capri Orange Women's Boston 3976
    Inferno Blue Men's Bury St Edmunds 122355
    TX Green Men's Leiston 49248

    You might name your first dimension Products and your second dimension Branch. The third column contains data.

    Note: To add extra dimensions, click Add dimension.
  9. Select the dimension structural type for each dimension.
    • For a flat list structure, select Leaf only in the Type column. For example, you might have a list of products.
    • For a simple parent-child structure, select Parent-Child in the Type column. For example, you might have two columns, Regions and Cities, where Regions is the parent, and Cities is the child.
    • If you are importing any dimensions with more than two levels, select the Multi-level import checkbox under Cube import settings. An example of a multi-level dimension is one with the following columns: Product, Product type, Product category, Total product.
  10. Map the data source column to dimension members for each dimension.
    • For Leaf only dimensions, in the Child column, select the column of data, which contains the leaf members.
    • For Parent-Child dimensions, in the Parent column, select the column of data that contains the parent members. Then, in the Child column, select the column of data that contains the child members.
    • For Multi-level dimension structures, do the following steps
      1. In the Leaf column, select the lowest level item in the dimension structure, for example Product.
      2. In the Level columns, select the next levels, for example, Product type in level 1, Product Category in Level 2. To add more levels, click (+).
        Multi-level dimension level cube import example
  11. To specify the data type, select the following options in the Data row:
    1. Select Numeric or String.
    2. Select which column the data is mapped to by clicking Select mapping.
  12. Set the following options as needed:
    Overwrite existing data
    If there is more than one value in the import file for a cell, only the last entry in the import file is imported. This option has no impact on string cells. If the cell contains text, the current value is always overwritten.
    Accumulate with existing data
    Sum up values as they are imported. Accumulate has no impact on string cells. If the cell contains text, the current value is always overwritten.
    Decimal separator
    You can set the character to use as the decimal separator.
    Thousand separator
    You can set the character to use as the thousand separator.
  13. Click Create cube.

What to do next

To check your cube, create a cube view from the cube in the Data tree.