After you create a dimension table, you can write data to the dimension table for data analysis. You can also import data from a workbook, local CSV file, or local Excel file to the dimension table for data analysis. This topic describes how to import data to a dimension table.

Prerequisites

A dimension table is created. For more information, see Create a dimension table.

Procedure

  1. In the All Dimension Tables section of the Dimension Table page, click the name of the desired dimension table in the File Name column.
  2. On the dimension table editing page, click Import in the upper-right corner.
  3. In the Import dialog box, select the type of the file that contains the data to be imported. Then, configure parameters in the Import dialog box.
    Note Only data of the STRING type can be imported to a dimension table. Data that is not of the STRING type is automatically converted to the data of the STRING type when the data is imported.
    Import dialog box
    • SpreadsheetSpreadsheet
      ParameterDescription
      SpreadsheetThe workbook from which you want to import data. Select a workbook from the Spreadsheet drop-down list.
      SheetThe sheet from which you want to import data. Select a sheet from the Sheet drop-down list.
      Data PreviewThe data that you want to import. When you preview the data in the selected sheet, you can determine whether to use the values in the first row as the column names by selecting or clearing the First Row as Field Names check box.
      Field MappingThe mappings between the columns in the selected sheet and the fields in the dimension table.
      Import Data ModeThe mode in which data is to be imported. Valid values: Append and Overlay.
    • Local CSV FileLocal CSV File
      ParameterDescription
      FileThe CSV file from which you want to import data. Click Select File(.csv), select a CSV file from your on-premises machine, and then click Open.
      Original Character SetThe character set that is used by the selected CSV file. Valid values: UTF-8 and GBK. If garbled characters appear, you can change the character set.
      SeparatorThe row delimiter and column delimiter.
      • The following row delimiters are supported: \r\n, \n, and \r.
      • The following column delimiters are supported: commas (,), semicolons (;), and \t.

      If the cell data cannot be correctly separated, you can change the delimiters.

      Data PreviewThe data that you want to import. When you preview the data in the selected CSV file, you can determine whether to use the values in the first row as the column names by selecting or clearing the First Row as Field Names check box.
      Field MappingThe mappings between the columns in the selected CSV file and the fields in the dimension table.
      Import Data ModeThe mode in which data is to be imported. Valid values: Append and Overlay.
    • Local Excel FileLocal Excel File
      ParameterDescription
      FileThe Excel file from which you want to import data. Click Select File(.xlsx), select an Excel file from your on-premises machine, and then click Open.
      SheetThe sheet from which you want to import data. Select a sheet from the Sheet drop-down list.
      Data PreviewThe data that you want to import. When you preview the data in the selected sheet, you can determine whether to use the values in the first row as the column names by selecting or clearing the First Row as Field Names check box.
      Field MappingThe mappings between the columns in the selected sheet and the fields in the dimension table.
      Import Data ModeThe mode in which data is to be imported. Valid values: Append and Overlay.
  4. Click OK.
  5. Click Save in the upper-right corner of the page. In the Diff From the Previous Version message, click Confirm Save.
    After you save the dimension table, you can use the version comparison feature to check whether the changes meet expectations to prevent accidental operations.