Hive CLI
Overview
Use Hive Cli Task
to create a Hive Cli
type task and execute hive SQL from scripts or files. The workers run hive -e
to execute hive sql from scripts or hive -f
to execute from files in Resource Center
.
Hive CLI Task vs SQL Task With Hive Datasource
In DolphinScheduler, we have both Hive CLI Task
and SQL Task With Hive Datasource
for different scenarios. You could choose between these two based on your needs.
- The
Hive CLI
task plugin connects directly toHDFS
and theHive Metastore
for hive task executions, which requires your workers to have access to those services, such as relatedHive
libs,Hive
andHDFS
configuration files. However,Hive CLI Task
provides better stability for scheduling in production. SQL Task With Hive Datasource
does not require access toHive
libs,Hive
andHDFS
configuration files and supportsKerberos
for authentication. However, you may encounterHiveServer2
failures if your hive sql task scheduling puts significant pressure on it.
Create Task
- Click
Project Management-Project Name-Workflow Definition
, and click theCreate Workflow
button to enter the DAG editing page. - Drag from the toolbar to the canvas.
Task Parameters
- Please refer to DolphinScheduler Task Parameters Appendix for default parameters.
Parameter | Description |
---|---|
Hive Cli Task Execution Type | The type of hive cli task execution, choose either FROM_SCRIPT or FROM_FILE . |
Hive SQL Script | If you choose FROM_SCRIPT for Hive Cli Task Execution Type , you need to fill in your SQL script. |
Hive Cli Options | Extra options for hive cli, such as —verbose |
Resources | If you choose FROM_FILE for Hive Cli Task Execution Type , you need to select your SQL file. |
Task Example
Hive Cli Task Example
This example below illustrates how to create a Hive CLI
task node and execute hive SQL from script:
This example below illustrates how to create a Hive CLI
task node and execute hive SQL from file:
当前内容版权归 DolphinScheduler 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 DolphinScheduler .