All Products
Search
Document Center

DataWorks:Create a CDH Hive node

Last Updated:Jun 20, 2026

If you have deployed a CDH cluster, you can use a CDH Hive node in DataWorks to run Hive tasks, such as data query jobs or batch data processing. This topic describes how to create a CDH Hive node.

Prerequisites

  • A workflow is created in DataStudio.

    In DataStudio, development tasks are organized into workflows. You must create a workflow before you can create a node. For more information, see Create a workflow.

  • A CDH cluster is created and registered with your DataWorks workspace.

    You must register your CDH cluster with a DataWorks workspace before creating CDH nodes and tasks. For more information, see Bind a CDH compute resource in the old version of DataStudio.

  • (Optional) If you are using a RAM user, the user must be added to the workspace and assigned the Development or Workspace Administrator role. The Workspace Administrator role has extensive permissions, so assign it with caution. For more information on adding members, see Add members to a workspace.

  • A serverless resource group is purchased and configured. The configuration includes binding the resource group to your workspace and setting up the network. For more information, see Use a serverless resource group.

Limitations

You can run this type of task on a serverless resource group or an old-version exclusive resource group for scheduling. We recommend using a serverless resource group.

Step 1: Create a CDH Hive node

  1. Log on to the DataWorks console. In the target region, click Data Development and O&M > Data Development in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.

  2. Right-click a workflow and choose Create Node > cdh > CDH Hive.

    Note

    Alternatively, you can hover over the New button at the top and follow the prompts to create a CDH node.

  3. In the Create Node dialog box, enter a Name for the node and click OK.

Step 2: Develop a Hive task

Double-click the node you created to open the task development page.

(Optional) Select a CDH cluster instance

If your workspace has multiple registered CDH clusters, select the appropriate one at the top of the page. This step is unnecessary if only one cluster is bound. To access domains that are protected by an allowlist, you must use an exclusive resource group for scheduling.

Develop SQL code: Simple example

Enter your SQL code in the editor. For example:

SHOW tables;
SELECT * FROM userinfo ;

Develop SQL code: Use scheduling parameters

Use Scheduling Parameter to dynamically pass values to your code at runtime. You can define variables in your code using the ${variable_name} format and then assign values to them in Scheduling > Parameter. For more information about supported formats, see Supported formats for scheduling parameters.

SELECT '${var}'; -- This is an example of using a scheduling parameter.

Step 3: Configure task scheduling

If you need to run the task on a recurring schedule, click Scheduling in the right-side pane to configure its scheduling properties:

Step 4: Debug the code

  1. (Optional) Select a runtime resource group and assign values to custom parameters.

  2. Save and run the SQL statements.

    In the toolbar, click the 保存 icon to save the SQL statements, and then click the 运行 icon to run the task.

  3. (Optional) Perform smoke testing.

    To run smoke testing in the development environment, you can do so during the commit process or after you commit the node. For more information, see Perform smoke testing.

Next steps

  1. Commit and deploy the task.

    1. In the toolbar, click the 保存 icon to save the node.

    2. In the toolbar, click the 提交 icon to commit the task.

    3. In the Commit Node dialog box, enter a Change Description.

    4. Click Determine.

    In a standard mode workspace, you must deploy the task to the production environment after you commit it. In the top menu bar, click Deploy. For more information, see Deploy tasks.

  2. View scheduled tasks.

    1. In the upper-right corner of the editor, click O&M Personnel to open the production environment's Operation Center.

    2. View the scheduled tasks that are running. For more information, see Manage scheduled tasks.

    To view more details about scheduled tasks, click Operation Center in the top menu bar. For more information, see Operation Center overview.