Page tree

Release 6.8.2


Contents:

   

For the latest updates on available API endpoints and documentation, see api.trifacta.com.

This is the latest version of the APIs.

Contents:


Create a jobGroup, which launches the specified job as the authenticated user.

The request specification depends on one of the following conditions:

  • Dataset has already had a job run against it and just needs to be re-run.
  • Dataset has not had a job run, or the job definition needs to be re-specified.

NOTE: Override values applied to a job are not validated. Invalid overrides may cause your job to fail.

Version:  v4

Required Permissions

NOTE: Each request to the Designer Cloud Powered by Trifacta® platform must include authentication credentials. See https://api.trifacta.com/ee/6.8/index.html#section/Authentication.

Request

Request Type: POST

Endpoint:

/v4/jobGroups

Request Body - Run job:

To run a job, you just specify the recipe identifier (wrangledDataset.id). If the job is successful, all defined outputs are generated, as defined in the outputobject, publications, and writeSettings objects associated with the recipe.

{
  "wrangledDataset": {
    "id": 7
  }
}

Request Body - Specify job:

If you must change some outputs or other settings for the specific job, you can insert these changes in the overrides section of the request. Below, the running environment (photon), profiling option, and writeSettings for the job are modified for this execution:

{
  "wrangledDataset": {
    "id": 1
  },
  "overrides": {
    "execution": "photon",
    "profiler": false,
    "writeSettings": [
      {
        "path": "<path_to_output_file>",
        "action": "create",
        "format": "csv",
        "compression": "none",
        "header": false,
        "asSingleFile": false
      }
    ]
  },
  "ranfrom": "ui"
}

Request Body - Specify job with parameter overrides:

If you have created a dataset with parameters, you can specify overrides for parameter values during execution through the APIs. Through this method, you can iterate job executions across all matching sources of a parameterized dataset.

  • You can also apply runtime parameters using the same request structure. For more information on creating datasets with parameters, see Overview of Parameterization.

In the following, the runParameters overrides have been specified for the varRegion and the varReferenceType variables. 

{
    "wrangledDataset": {
        "id": 33
    },
    "overrides": {
      "writesettings": [
      {
        "path": "<path_to_output_file>",
        "action": "create",
        "format": "csv",
        "compression": "none",
        "header": false,
        "asSingleFile": false
      }
      ]
    },
    "runParameters": {
      "overrides": {
        "data": [{
          "key": "Region",
          "value": "02"
        },
        {
          "key": "varReferenceType",
          "value": "PROD"
        }
       ]
      }
    },
  "ranfrom": "ui"
}

Response

Response Status Code - Success:  201 - Created

Response Body Example:

{
    "sessionId": "79276c31-c58c-4e79-ae5e-fed1a25ebca1",
    "reason": "JobStarted",
    "jobGraph": {
        "vertices": [
            21,
            22
        ],
        "edges": [
            {
                "source": 21,
                "target": 22
            }
        ]
    },
    "id": 9,
    "jobs": {
        "data": [
            {
                "id": 21
            },
            {
                "id": 22
            }
        ]
    }
}

Reference

Request Reference:

PropertyDescription
wrangledDataset
(required) Internal identifier for the object whose results you wish to generate. The recipes of all preceding datasets on which this dataset depends are executed as part of the job.
ranfrom

(optional) If this value is set to null, then the job does not show up in the Job Details page.

See Job Details Page.

Request overrides:

PropertyDescription
overrides.execution

(required, if first time running the job) Indicates the running environment on which the job is executed. Depending on your product, the following may be accepted values:

  • photon - running environment on Alteryx node
  • spark - Spark on integrated cluster, with the following exceptions.
  • databricksSpark - Spark on Azure Databricks

  • emrSpark - Spark on AWS EMR

For more information, see Running Environment Options.

overrides.profiler

(required, if first time running the job) When set to true, a visual profile of the job is generated as specified by the profiling options for the platform. See Profiling Options.

overrides.writeSettings

(required, if first time running the job) These settings define the publishing options for the job. For more information, see API WriteSettings Get v4.

For more information on other override options, see API Workflow - Run Job.

Response reference:

PropertyDescription
reasonCurrent state of the job group at time of API call. Since this call creates the job group, this value is always Job started in the response to this call.
sessionIdSession identifier for the job group.
idInternal identifier of the job group.
jobGraphInternal identifiers of the internal objects executed for the job.
jobsInternal identifiers of the jobs within the job group that were executed as part of this run. Jobs are listed in order of execution.

This page has no comments.