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 r079

...

The next step is to swap the primary input dataset for the recipe to point at the newly imported dataset. This step automatically adds the imported dataset to the flow and drops the previous imported dataset from the flow. 

Info

NOTE: When you swap datasets, existing samples are not automatically discarded. These samples are invalid. As a workaround, you can generate a new sample manually. For more information on generating samples through the application, see Samples Panel.


  1. Use the following to swap the primary input dataset for the recipe:

    Endpointhttp://www.example.com:3005/v4/wrangledDatasets/9/primaryInputDataset
    AuthenticationRequired
    MethodPUT
    Request Body
    Code Block
    {
      "importedDataset": {
        "id": 12
      }
    }
  2. The response should be a 200 - OK status code with something like the following:

    Code Block
    {
        "id": 9,
        "wrangled": true,
        "createdAt": "2019-03-03T17:58:53.979Z",
        "updatedAt": "2019-03-03T18:01:11.310Z",
        "recipe": {
            "id": 9,
            "name": "POS-r01",
            "description": null,
            "active": true,
            "nextPortId": 1,
            "createdAt": "2019-03-03T17:58:53.965Z",
            "updatedAt": "2019-03-03T18:01:11.308Z",
            "currentEdit": {
                "id": 8
            },
            "redoLeafEdit": {
                "id": 7
            },
            "creator": {
                "id": 1
            },
            "updater": {
                "id": 1
            }
        },
        "referenceInfo": null,
        "activeSample": {
            "id": 7
        },
        "creator": {
            "id": 1
        },
        "updater": {
            "id": 1
        },
        "referencedFlowNode": null,
        "flow": {
            "id": 2
        }
    }
  3. The new imported dataset is now the primary input for the recipe, and the old imported dataset has been removed from the flow. 
D s api refdoclink
operation/updateInputDataset


Step - Swap Bucket and Path for Imported Dataset

...

  1. Use the following to swap the source of your imported dataset for the recipe:

    Endpointhttp://www.example.com:3005/v4/importedDatasets/9/
    AuthenticationRequired
    MethodPUT
    Request Body
    Code Block
    {
      "bucket": "MyBucket",
      "path": "/path/to/my/file.csv",
    }
    
    
  2. The response should be a 200 - OK status code with the imported dataset definition.

  3. The new definition of the imported dataset is now applicable to all objects that reference it.

...