Importing a Job
Function
This API is used to import one or more job files from OBS to DLF.
Before using this API, store job files in OBS buckets.
URI
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain a project ID, see Project ID and Account ID.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
Yes |
String |
If OBS is deployed, it refers to the OBS path for storing the job definition file. For the format of the job definition file, see the response message of the exported job, for example, obs://myBucket/jobs.zip. |
params |
No |
Map<String,String> |
Public job parameters |
sameNamePolicy |
No |
String |
Policy for specifying how to handle duplicate names. The options are as follows:
Default value: SKIP |
jobsParam |
No |
List<JobParam> |
Job parameter. For details, see Table 3. |
executeUser |
No |
String |
User that executes the job |
targetStatus |
No |
String |
This parameter is required if the review function is enabled. It indicates the target status of the job. The value can be SAVED, SUBMITTED, or PRODUCTION.
|
approvers |
No |
List<JobApprover> |
Job approver. This parameter is required if the review function is enabled. For details, see Table 4. For details about how to configure the review function, see Review Center. |
resources |
No |
List<JobResourceInfo> |
This parameter is mandatory for replacing a resource. You must set the name and type of the resource to be replaced, and the name of the resource used to replace the existing resource. For details, see Table 5. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Job name |
params |
No |
Map<String,String> |
Job parameters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
approverName |
Yes |
String |
Approver name |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Resource name |
type |
Yes |
String |
Resource type. The following resource types are supported: DWS_CONNECTION, DIS_STREAM, CDM_CLUSTER, MRS_CLUSTER, MRS_HIVE_CONNECTION, MRS_SPARK_CONNECTION, GES_GRAPH, ROMA_INSTANCE, TICS_INSTANCE, and DRS_TASK |
replace |
No |
String |
Name of the resource used to replace the existing resource |
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
taskId |
Yes |
String |
ID of the task. Used to call the API for querying system tasks to obtain the import status. |
Example Request
POST /v1/b384b9e9ab9b4ee8994c8633aabc9505/jobs/import { "path": "obs://aaaaa/job_batch.zip", "jobsParam": [ { "name": "job_batch" } ] }
POST /v1/b384b9e9ab9b4ee8994c8633aabc9505/jobs/import { "path": "obs://aaaaa/job_batch.zip", "jobsParam": [ { "name": "job_batch" } ], "targetStatus": "SUBMITTED", "approvers": [ { "approverName": "userName1" }, { "approverName": "userName2" } ] }
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