Cross-Workspace Job Scheduling
Applicable Scenario
If you have assigned permissions based on workspaces, users in different workspaces can only perform operations on jobs in their own workspaces. However, jobs in different workspaces depend on each other. Therefore, they need to be scheduled cross workspaces. Refer to this section for cross-workspace job scheduling details.
Solution Overview
The DGC Data Development module supports job running triggered by events. Therefore, DIS or MRS Kafka can be used as the job dependency to implement cross-workspace job scheduling.
As shown in the following figure, after Job 1 in workspace 1 is executed, you can use the DIS Client or Kafka Client to send a message to trigger Job 2; Configure event-triggered scheduling for Job 2, that is, trigger job 2 based on the messages sent by the DIS Client or Kafka Client.
Configuration Method
- Log in to the DGC console, select a DGC instance, and click Access.
On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.
- Click Data Development of the corresponding workspace.
The Data Development page is displayed.
- Create jobs in two different workspaces. For example, create a job named job_het in one workspace and create a job named job_het1 in another workspace.
After the job in one workspace is executed, use the DIS Client to send a trigger message. Send a single character string message to trigger the job in another workspace.
Figure 2 Creating a job
- Configure the job_het1 job in another workspace. Figure 3 shows the configuration node. An empty node is selected for the stream. TYPEA and TYPEB are Subjob nodes.
- Move the pointer to the empty node icon, and drag the
icon to connect the node task to another node task. - Right-click a line and choose Set Condition from the shortcut menu. In the Edit EL Expression dialog box, enter the IF condition.
- The IF condition is configured as follows:
#{StringUtil.equals(StringUtil.split(Job.eventData,',')[1],'typeA')} #{StringUtil.equals(StringUtil.split(Job.eventData,',')[1],'typeB')}
When the trigger message sent in 3 is "workspace A, type A", the TYPEA node is executed. If the message is "workspace A, type B", the TYPEB node is executed.
- After the configuration is complete, start scheduling job in workspace B. After the job in workspace A is tested, the job in space B is triggered. Figure 4 Viewing results
- Move the pointer to the empty node icon, and drag the
Last Article: Developing Hive SQL Scripts
Next Article: Data Security (OBT)

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.