...
Endpoint | <protocol>://<platform_base_url>/v4/jobGroups/<id>/status | ||
---|---|---|---|
Authentication | Required | ||
Method | GET | ||
Request Body | None. | ||
Response Code | 200 - Ok | ||
Response Body |
|
...
- Acquire the internal identifier for the recipe for which you wish to execute a job. In the previous example, this identifier was
28629
. Construct a request using the following:
Endpoint <protocol>://<platform_base_url>/v4/jobGroups
Authentication Required Method POST
Request Body:
Code Block { "wrangledDataset": { "id": 28629 }, "overrides": { "profiler": true, "execution": "spark", "writesettings": [ { "path": "<new_path_to_output>", "format": "csv", "header": true, "asSingleFile": true } ] }, "ranfrom": null }
- In the above example, the job has been launched with the following overrides:
Job will be executed on the Spark cluster. Other supported values depend on your deployment:
For more information, see Running Environment Options.Value for overrides.execution
Description photon
Running environment on
D s node spark
Spark on integrated cluster, with the following exceptions. databricksSpark
Spark on Azure Databricks
emrSpark
Spark on AWS EMR
- Job will be executed with profiling enabled.
- Output is written to a new file path.
- Output format is CSV to the designated path.
- Output has a header and is generated as a single file.
A response code of
201 - Created
is returned. The response body should look like the following:Code Block { "sessionId": "79276c31-c58c-4e79-ae5e-fed1a25ebca1", "reason": "JobStarted", "jobGraph": { "vertices": [ 21, 22 ], "edges": [ { "source": 21, "target": 22 } ] }, "id": 962221, "jobs": { "data": [ { "id": 21 }, { "id": 22 } ] } }
Retain the
id
value, which is the job identifier, for monitoring.
...
- Path to database to which to write (must have write access)
Connection to write to the target.
Tip Tip: This identifier is for the connection used to write to the target system. This connection must already exist. For more information on how to retrieve the identifier for a connection, see API Connections Get List v4.
- Name of output table
Target table type
Tip Tip: You can acquire the target type from the
vendor
value in the connection response. For more information, see API Connections Get List v4.action:
Key value Description create
Create a new table with each publication. createAndLoad
Append your data to the table. truncateAndLoad
Truncate the table and load it with your data. dropAndLoad
Drop the table and write the new table in its place. - Identifier of connection to use to write data.
...
Step - Run Job with Overrides - Webhooks Webhooks
When you execute a job, you can pass in a set of parameters as overrides to generate a webhook message to a third-party application, based on the success or failure of the job.
For more information on webhooks, see see Create Flow Webhook Task.
- Acquire the internal identifier for the recipe for which you wish to execute a job. In the previous example, this identifier was
28629
. Construct a request using the following:
Endpoint <protocol>://<platform_base_url>/v4/jobGroups
Authentication Required Method POST
Request Body:
Code Block { "wrangledDataset": { "id": 28629 }, "overrides": { "webhooks": [{ "name": "webhook override", "url": "http://example.com", "method": "post", "triggerEvent": "onJobFailure", "body": { "text": "override" }, "headers": { "testHeader": "val1" }, "sslVerification": true, "secretKey": "123", }] } }
In the above example, the job has been launched with the following overrides:
Override setting Description name Name of the webhook. url URL to which to send the webhook message. method The HTTP method to use. Supported values: POST
,PUT
,PATCH
,GET
, or DELETE. Body is ignored forGET
andDELETE
methods.triggerEvent Supported values:
onJobFailure
- send webhook message if job failsonJobSuccess
- send webhook message if job completes successfullyonJobDone
- send webhook message when job fails or finishes successfullybody (optional) The value of the
text
field is the message that is sent.Info NOTE: Some special token values are supported. See Create Flow Webhook Task.
header (optional) Key-value pairs of headers to include in the HTTP request. sslVerification (optional) Set to true
if SSL verification should be completed. If not specified, the value istrue
.secretKey (optional) If enabled, this value should be set to the secret key to use. A response code of
201 - Created
is returned. The response body should look like the following:Code Block { "sessionId": "79276c31-c58c-4e79-ae5e-fed1a25ebca1", "reason": "JobStarted", "jobGraph": { "vertices": [ 21, 22 ], "edges": [ { "source": 21, "target": 22 } ] }, "id": 962222, "jobs": { "data": [ { "id": 21 }, { "id": 22 } ] } }
Retain the
id
value, which is the job identifier, for monitoring.
...