Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0642

...

  • 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.

D s job overrides

Version:  v4

Required Permissions

D s api auth

...

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 outputobjectoutputObject, publications, and writesettings writeSettings objects associated with the recipe.

Code Block
{
  "wrangledDataset": {
    "id": 7
  }
}

...

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

Code Block
{
  "wrangledDataset": {
    "id": 1
  },
  "overrides": {
    "execution": "photon",
    "profiler": false,
    "writesettingswriteSettings": [
      {
        "path": "hdfs://hadoop:50070/trifacta/queryResults/admin@example.com/cdr_txt.csv<path_to_output_file>",
        "action": "create",
        "format": "csv",
        "compression": "none",
        "header": false,
        "asSingleFile": false
      }
    ]
  },
  "ranfrom": "ui"
}

...

In the following, the runParameters override  override has been specified for the varRegion. In this case, the value 02 is  is inserted for the specified variable as part of the job execution.

Code Block
{
  "wrangledDataset": {
    "id": 33
  },
  "overrides": {
    "execution": "photon",
    "profiler": false,
    "writesettingswriteSettings": [
      {
        "path": "hdfs://hadoop:50070/trifacta/queryResults/admin@example.com/cdr_txt.csv<path_to_output_file>",
        "action": "create",
        "format": "csv",
        "compression": "none",
        "header": false,
        "asSingleFile": false
      }
    ],
    "runParameters": {
      "overrides": {
        "data": [{
          "key": "varRegion",
          "value": "02"
        }
      ]}
    },
  },
  "ranfrom": "ui"
}

...

Response Status Code - Success:  201 - Created

Response Body Example:

Code Block
{

    "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. Accepted values:

  • photon
  • spark

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
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

.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

.

...

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.