Create models by importing
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.
-
On the Dimensional Modeling page, click the
icon and select Import from Excel. -
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.
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.
-
On the Dimensional Modeling page, double-click the name of the table in the directory tree.
-
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.
-
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), andds(STRING, business date). The table comment is "City dimension table", and the lifecycle is 1,000 days.