Developing and Submitting a SQL Job Using a SQL Job Template
DLI allows you to create custom templates or save currently used SQL statements as templates for quick and convenient SQL operations. Once a template is saved, you can execute SQL operations directly through the template without the need to write SQL statements.
The system offers sample templates that include various standard TPC-H query statements. You can choose to use one of these templates or create a custom template to create a SQL job.
This example shows how to use a TPC-H sample template to develop and submit a SQL job.
Procedure
- Log in to the DLI management console.
- In the navigation pane on the left, choose Job Templates > SQL Templates.
- On the displayed Sample Templates tab, find a sample template that matches your service scenario under tpchQuery and click Execute in the Operation column.
- In the upper part of the editing window, set Engine to Spark, Queues to default, and Databases to default, and click Execute.
- Check the query result on the View Result tab below the editing window.
This example uses the default queue and database preset in the system as an example. You can also run the command in a self-created queue and database.
For details, see Creating a Queue. For how to create a database, see Creating a Database.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot