This topic describes how to configure a Hive SQL job.
Prerequisites
A project is created. For more information, see
Manage projects.
Procedure
- Go to the Data Platform tab.
- Log on to the Alibaba Cloud EMR console by using your Alibaba Cloud account.
- In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
- Click the Data Platform tab.
- In the Projects section, find your project and click Edit Job in the Actions column.
- Create a Hive SQL job.
- In the Edit Job pane on the left, right-click the folder on which you want to perform
operations and select Create Job.
- In the Create Job dialog box, specify Name and Description, and select HiveSQL from the Job Type drop-down list.
This option indicates that a Hive SQL job will be created. You can use the following
command syntax to submit a Hive SQL job:
hive -e {SQL CONTENT}
SQL CONTENT
refers to the SQL statements that you enter in the job editor.
- Click OK.
- Edit job content.
- Enter Hive SQL statements in the Content field.
-- SQL statement example
-- The size of SQL statements cannot exceed 64 KB.
show databases;
show tables;
-- LIMIT 2000 is automatically used for the SELECT statement.
select * from test1;
- Click Save.