This topic describes how to configure a Hive SQL job.
Prerequisites
Ensure you have created a project. For more information, see project management.Procedure
-
Go to the Projects page in Data Platform.
-
Log in to the E-MapReduce console with your Alibaba Cloud account.
-
In the top navigation bar, select the region and resource group.
-
Click the Data Development tab.
-
-
In the row of the project you want to edit, click Edit Job.
- Create a Hive SQL job.
- On the left side of the page, right-click the target folder and select Create Job.
- In the Create Job dialog box, enter a Job Name and Job Description, and select Hive SQL from the Job Type drop-down list.
EMR submits this type of job by running the following command:
hive -e {SQL CONTENT}SQL_CONTENTIn this command, is the SQL statements that you enter in the job editor. - Click OK.
- Edit the job content.
- In the Content field, enter the Hive SQL statements.
-- Example SQL statements. -- The maximum size of the SQL statements is 64 KB. show databases; show tables; -- The system automatically adds 'LIMIT 2000' to SELECT statements. select * from test1; - Click Save.
- In the Content field, enter the Hive SQL statements.