Updated the primary input dataset for the specified wrangled dataset. Each wrangled dataset must have one and only one primary input dataset, which can be an imported or wrangled dataset.

Tip: In the UI, the WrangledDataset object is called a recipe.

This action performs a dataset swap for the source of a wrangled dataset, which can be done through the UI. See Flow View Page.

Tip: After you have created a job via API, you can use this API to swap out the source data for the job's dataset. In this manner, you can rapidly re-execute a pre-existing job using fresh data. See API JobGroups Create v3.

Version: v3

Required Permissions

Request

Request Type: PUT

Endpoint:

/v3/wrangledDatasets/<id>/primaryInputDataset

where:

ParameterDescription
<id>Internal identifier for the wrangled dataset

Request URI - Example:

/v3/wrangledDatasets/3/primaryInputDataset

 

Request Body - imported dataset:

{
  "importedDataset": {
    "id": <id>
  }
}

Request Body - wrangled dataset:

{
  "wrangledDataset": {
    "id": <id>
  }
}

Response

Response Status Code - Success: 200 - OK

Response Body Example:

{
  "id": 50,
  "scriptId": 49,
  "flowId": 10,
  "flowNodeId": null,
  "deleted_at": null,
  "wrangled": true,
  "createdAt": "2017-02-21T16:53:15.619Z",
  "updatedAt": "2017-02-21T17:04:03.257Z",
  "activesampleId": 33,
  "createdBy": 1,
  "updatedBy": 1
}

Reference

For more information on these properties, see API WrangledDatasets Get PrimaryInputDataset v3.