All Products
Search
Document Center

DataWorks:Create a CDH Impala node

Last Updated:Nov 13, 2024

In DataWorks, you can use Cloudera's Distribution Including Apache Hadoop (CDH) Impala nodes to write and run Impala SQL scripts. CDH Impala nodes provide higher query performance than CDH Hive nodes. This topic describes how to create and use a CDH Impala node.

Limits

Tasks on this type of node can be run on serverless resource groups or old-version exclusive resource groups for scheduling. We recommend that you run tasks on serverless resource groups.

Step 1: Create a CDH Impala node

  1. Go to the DataStudio page.

    Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and Governance > Data Development. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.

  2. On the DataStudio page, find the desired workflow, right-click the workflow name, and then choose Create Node > CDH > CDH Impala.

    Note

    Alternatively, you can move the pointer over the Create icon at the top of the Scheduled Workflow pane and create a CDH node as prompted.

  3. In the Create Node dialog box, configure the Name parameter and click Confirm. Then, you can use the created node to develop and configure tasks.

Step 2: Develop an Impala task

You can double-click the name of the created node to go to the configuration tab of the node and then perform the following operations to develop a task.

(Optional) Select a CDH cluster

If multiple CDH clusters are registered to the current workspace, you must select one from the Engine Instance CDH drop-down list based on your business requirements. If only one CDH cluster is registered to the current workspace, you do not need to select a CDH cluster.image.png

Simple SQL code development example

In the SQL editor, enter code for the node. Example:

show tables;

select * from userinfo ;

Develop SQL code: Use scheduling parameters

DataWorks provides scheduling parameters whose values are dynamically replaced in the code of a task based on the configurations of the scheduling parameters in periodic scheduling scenarios. You can define variables in the task code in the ${Variable} format and assign values to the variables in the Scheduling Parameter section of the Properties tab. For information about the supported formats of scheduling parameters, see Supported formats of scheduling parameters.

select '${var}'; -- You can assign a specific scheduling parameter to the var variable.

Step 3: Configure task scheduling properties

If you want the system to periodically run a task on the node, you can click Properties in the right-side navigation pane on the configuration tab of the node to configure task scheduling properties based on your business requirements.

Step 4: Debug task code

  1. Optional. Select a resource group and assign custom parameters to variables.

  2. Save and execute the SQL statements.

    In the top toolbar, click the 保存 icon to save the SQL statements. Then, click the 运行 icon to execute the SQL statements.

  3. Optional. Perform smoke testing.

    You can perform smoke testing on the task in the development environment when you commit the task or after you commit the task. For more information, see Perform smoke testing.

What to do next

  1. Commit and deploy the task.

    1. Click the 保存 icon in the top toolbar to save the task.

    2. Click the 提交 icon in the top toolbar to commit the task.

    3. In the Submit dialog box, configure the Change description parameter.

    4. Click Confirm.

    If you use a workspace in standard mode, you must deploy the task in the production environment after you commit the task. To deploy a task on a node, click Deploy in the top navigation bar of the DataStudio page. For more information, see Deploy tasks.

  2. View the task.

    1. Click Operation Center in the upper-right corner of the configuration tab of the corresponding node to go to Operation Center in the production environment.

    2. View the scheduled task. For more information, see View and manage auto triggered tasks.

    To view more information about the task, click Operation Center in the top navigation bar of the DataStudio page. For more information, see Overview.