Without governance controls, team members can create MaxCompute physical tables directly in DataStudio, bypassing your data warehouse modeling standards. System management in DataWorks Data Modeling lets you define and enforce three types of governance policies—table creation, DDL code generation, and model publishing—so the system automatically blocks non-compliant operations and standardizes the DDL output your compute engines produce.
Scope and limitations
| Policy | Applies to | Trigger | Exceptions |
|---|---|---|---|
| Table creation | MaxCompute physical tables only | Submit or publish in DataStudio | Tables created via API are not subject to this policy |
| Code generation | MaxCompute, Hive, MySQL, and Hologres | — | — |
If you enable a table creation policy for a workspace, the policy also applies to all development spaces managed by that workspace.
Go to System management
-
Log on to the DataWorks console. In the top navigation bar, select a region. In the left-side navigation pane, choose Data Development and O&M > Data Modeling. Select a workspace from the drop-down list and click Go to Data Modeling.
-
In the top menu bar of the Data Modeling page, click Data Warehouse Planning to open the Data Layer page.
-
In the left navigation pane, click System Management.
Table creation policy management
Configure and enable a table creation policy
On the Table Creation Policy Management tab, define which physical table names require a Data Modeling model before they can be submitted or published from DataStudio.
| Parameter | Description |
|---|---|
| Rule | Restricts physical table naming in DataStudio. Specify whether the table name must start with a particular pattern. Currently applies to table name prefixes only. |
| Group | A collection of rules applied together. Add multiple groups to cover different naming conventions. |
| Logic between rules | Defines how multiple rules combine: Or (any one rule must match) or And (all rules must match). |
After configuring the policy, manually enable it to activate enforcement in DataStudio.
Example
The following policy blocks direct table creation in DataStudio for any table whose name starts with dim or dws. To create tables with these prefixes, first create a model in Data Modeling > Dimensional Modeling, then publish it as a physical table.
Resolve a blocked table creation
If you create or modify a table in DataStudio that violates the policy, the system blocks the submit and publish operations and displays a checker alert.
Code generation policy management
Configure a code generation policy
The code generation policy defines how the COMMENT clause in a DDL statement maps to display fields in the visual modeling UI.
| DDL element | Maps to |
|---|---|
COMMENT (table) |
Display Name or Description in Basic Information |
COMMENT (column) |
Field Display Name or Description in Field Management |
After you enable the policy, the configured mapping applies in these features:
-
Script Mode modeling: When you generate a model from a supported compute engine DDL statement, the
COMMENTclause is interpreted using the defined mapping. -
Export a model: When you export a model to a DDL statement, the
COMMENTclause is generated using the defined mapping. -
Table details: On the Details tab in Data Map, DDL statements generated for a table reflect the defined mapping.
Example
The following example uses a policy configured with Basic Information - Table Display Name and Field Management - Field Display Name.
Script Mode — the COMMENT clause reflects the table and field display names:
Export a model — the exported DDL statement applies the same mapping:
Publishing policy management
The publishing policy controls which publishing modes are available when you materialize a model, and sets the default selection.
| Parameter | Description |
|---|---|
| Valid value | The publishing modes available when publishing a model. Configure one or more modes. |
| Default setting | The mode selected by default when publishing. Must be one of the modes listed in Valid value. |
Available publishing modes:
| Mode | Behavior |
|---|---|
| Incremental Publish | Publishes only the changes made to the model to the corresponding compute engine. |
| Delete and Recreate | Deletes the previously published physical table from the compute engine and then recreates it based on the current model version. |