If you need to use Impala SQL during data development, you can configure an Impala SQL job in an E-MapReduce (EMR) cluster. This topic describes how to configure an Impala SQL job.

Prerequisites

A project is created. For more information, see Manage projects.

Procedure

  1. Go to the Data Platform tab.
    1. Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
    3. Click the Data Platform tab.
  2. In the Projects section, find your project and click Edit Job in the Actions column.
  3. Create an Impala SQL job.
    1. In the Edit Job pane on the left, right-click the folder on which you want to perform operations and select Create Job.
    2. In the Create Job dialog box, specify Name and Description, and select Impala SQL from the Job Type drop-down list.
      You can use the following command syntax to submit an Impala SQL job:
      impala-shell -f {SQL_CONTENT} [options];
      The following table describes the parameters in the syntax.
      Parameter Description
      SQL_CONTENT The entered SQL statement.
      options The setting of the IMPALA_CLI_PARAMS parameter that you configure by performing the following operations: Click Job Settings in the upper-right corner of the job page. In the Job Settings pane, click the Advanced Settings tab. Click the add icon in the Environment Variables section and add the IMPALA_CLI_PARAMS parameter. For example, set IMAPAL_CLI_PARAMS to "-u hive".
    3. Click OK.
  4. Edit job content.
    1. Enter the Impala SQL statements in the Content field.
      Example:
      show databases;
      show tables;
      select * from test1;
    2. Click Save.