createJob
- Print
- PDF
createJob
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Create a job.
POST https://dataflow.apigw.ntruss.com/api/v1/jobs
Request
Request body
Parameter name | Required | Type | Restrictions | Description |
---|---|---|---|---|
name | Yes | String | - English letters, starting with an underscore () - English letters, numbers, underscores () and hyphens (-) are allowed - Enter between 3 and 20 characters | Job name |
nodes | Yes | ETLJobNode | Job node |
Response
Field name | Type | Description | Remarks |
---|---|---|---|
jobId | String | Task ID | |
name | String | Job name | |
type | String | Job type | |
status | String | Job status | |
nodes[].id | Number | Node ID | |
nodes[].name | String | Node name | |
nodes[].type | String | Node type | |
nodes[].parentNodeIds | Array | Parent node ID | |
runCondtion.workerType | String | Worker type | |
runCondition.numWorker | Number | Number of workers | |
runCondition.timeout | Number | Execution timeout | |
runCondition.nrn | String | Policy NRN | |
runCondition.scriptPath | String | Executable script storage path | |
runCondition.logPath | String | Execution log storage path | |
createdDate | String | Job creation date | |
updatedDate | String | Last update |
Response status
HTTP Status | Desc |
---|---|
201 | Created (Successfully created) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Examples
Request example
POST /api/v1/jobs
Host: dataflow.apigw.ntruss.com
x-ncp-iam-access-key: {Access key}
x-ncp-apigw-signature-v2: {API GW signature}
x-ncp-apigw-timestamp: {timestamp}
{
"name": "data-flow",
"nodes": [
{
"type": "SOURCE_OBS",
"id": 1697776914576,
"name": "Object Storage",
"parentNodeIds": [],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"fieldList": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
}
]
},
{
"type": "TRANSFORM_FILTER",
"id": 1697776942407,
"name": "Filters",
"parentNodeIds": [
1697776914576
],
"filterType": "AND",
"filterConditionList": [
{
"name": "name",
"operator": "EQ",
"value": "A"
}
]
},
{
"type": "TARGET_OBS",
"id": 1697776948956,
"name": "Object Storage",
"parentNodeIds": [
1697776942407
],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"updateType" : "OVERWRITE",
"fieldList": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
}
]
}
]
}
Response example
{
"jobId": "5Yns7JgRt25f",
"name": "data-flow",
"description": "",
"type": "DATAFLOW",
"status": "RUNNABLE",
"nodes": [
{
"type": "SOURCE_OBS",
"id": 1697776914576,
"name": "Object Storage",
"parentNodeIds": [],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"fieldList": [
{
"name": "id",
"type": "string",
"properties": []
},
{
"name": "name",
"type": "string",
"properties": []
},
{
"name": "description",
"type": "string",
"properties": []
}
]
},
{
"type": "TRANSFORM_FILTER",
"id": 1697776942407,
"name": "Filters",
"parentNodeIds": [
1697776914576
],
"filterType": "AND",
"filterConditionList": [
{
"name": "name",
"operator": "EQ",
"value": "A"
}
]
},
{
"type": "TARGET_OBS",
"id": 1697776948956,
"name": "Object Storage",
"parentNodeIds": [
1697776942407
],
"regionNo": "1",
"bucketName": "aitems",
"prefix": "dataflow1",
"dataType": "CSV",
"updateType" : "OVERWRITE",
"fieldList": [
{
"name": "id",
"type": "string",
"properties": []
},
{
"name": "name",
"type": "string",
"properties": []
},
{
"name": "description",
"type": "string",
"properties": []
}
]
}
],
"runCondition": {
"workerType": "DEFAULT",
"numWorker": 2,
"timeout": 2880,
"nrn": "",
"scriptPath": "dataflow-****/scripts/",
"logPath": "dataflow-****/sparkHistoryLogs/"
},
"createdDate": "2023-10-20T13:45:15.000",
"updatedDate": "2023-10-20T13:46:56.000"
}
Was this article helpful?