Create a cube from a file
Modelers can create and populate a cube and its dimensions from a text file.
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.
- In edit mode, go to the database in the Data tree where you want to create the cube.
- Right-click the database, then click Import data.
- Click the cubes list, and select New cube.
- 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.
- Name the cube in the New cube name field.
- 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 .
- Click Continue
- 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.
- 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.
- 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
- In the Leaf column, select the lowest level item in the dimension structure, for example Product.
- In the Level columns, select the next levels, for example,
Product type in level 1, Product Category in Level 2. To add more levels,
- To specify the data type, select the following options in the Data
- Select Numeric or String.
- Select which column the data is mapped to by clicking Select mapping.
- 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.
- Click Create cube.