Importing a Flink Job
Function
This API is used to import Flink job data.
Debugging
You can debug this API in API Explorer.
URI
- URI format
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| zip_file | Yes | String | Path of the job ZIP file imported from OBS. You can enter a folder path to import all ZIP files in the folder. NOTE: The folder can contain only .zip files. |
| is_cover | No | Boolean | Whether to overwrite an existing job if the name of the imported job is the same as that of the existing job in the service. |
Response
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_success | No | Boolean | Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
| message | No | String | System prompt. If execution succeeds, the parameter setting may be left blank. |
| job_mapping | No | Array of Objects | Information about the imported job. For details, see Table 4. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| old_job_id | No | Long | ID of a job before being imported. |
| new_job_id | No | Long | ID of a job after being imported. If is_cover is set to false and a job with the same name exists in the service, the returned value of this parameter is -1. |
| remark | No | String | Results about an imported job. |
Example
- Example request
{ "zip_file": "test/ggregate_1582677879475.zip", "is_cover": true } - Example response
{ "is_success": true, "message": "The job is imported successfully.", "job_mapping": [ { "old_job_id": "100", "new_job_id": "200", "remark": "Job successfully created" } ] }
Status Codes
Table 5 describes status codes.
Error Codes
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.
Last Article: Exporting a Flink Job
Next Article: Generating a Static Stream Graph for a Flink SQL Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.