All Products
Search
Document Center

DataWorks:Create a CDH Impala node

Last Updated:Mar 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.

Step 1: Create a CDH Impala node

  1. Go to the DataStudio page.

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

  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 compute engine instance

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 ;

Use scheduling parameters to develop SQL code

DataWorks provides scheduling parameters. To enable parameters to be dynamically passed in the code of a node, you can define variables in the node code in the ${Variable name} format, and assign parameters to the variables as values in the Scheduling Parameter section of the Properties tab on the configuration tab of the node. 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.

What to do next

  1. Commit and deploy the node.

    1. Click the Save icon in the top toolbar to save the node.

    2. Click the Submit icon in the top toolbar to commit the node.

    3. In the Commit Node dialog box, configure the Change description parameter.

    4. Click OK.

    If you use a workspace in standard mode, you must deploy the node in the production environment after you commit the node. On the left side of the top navigation bar, click Deploy. For more information, see Deploy nodes.

  2. View the node.

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

    2. View the scheduled node. For more information, see View and manage auto triggered nodes.

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