Create models by importing

Updated at:
Copy as MD

You can import tables from local Excel files into DataWorks Dimensional Modeling, or export tables from Dimensional Modeling to your data warehouse.

Import tables

You can import a table from a local Excel file into Dimensional Modeling.

  1. On the Dimensional Modeling page, click the 导入 icon and select Import from Excel.

  2. On the Create Import Task page, specify the Import Type and download the corresponding template. Fill in the template with your model information and follow the on-screen instructions to import the data. For more information, see Batch Import.

Export table configuration

You can export the configuration of an existing table as a DDL or DML statement.

Note

Before you begin, ensure that you have created a dimension table, fact table, or aggregate table. For instructions, see Create a logical model: Dimension table, Create a logical model: Fact table, and Create a logical model: Aggregate table.

  1. On the Dimensional Modeling page, double-click the name of the table in the directory tree.

  2. On the table details page, click Export in the toolbar. You can choose to export a DDL statement for the MaxCompute, Hologres, or Hive engine, or a DML statement for the MaxCompute engine.

  3. In the DDL export dialog box that appears, the DDL statement for creating the table is displayed. You can click Export File to generate an SQL file, or click Copy and then run the statement in the target engine.

    In this example, the DDL statement is CREATE TABLE IF NOT EXISTS dim_ec_pub_city_df. It includes three fields: city_id (STRING, city ID), city_name (STRING, city name), and ds (STRING, business date). The table comment is "City dimension table", and the lifecycle is 1,000 days.