This feature enables ad-hoc bulk-editing scenarios by allowing a user to launch a pipeline from a data view page which processes only the rows the user is currently viewing/filtering. Examples of its use include changing the publishing state of or bulk deleting a selected set of rows.

In the “How it behaves” section below, we walk through an example of how an end-user may use the feature to bulk delete data in a storage table. In the section that follows, we show how to set it up. The example is relatively simple but one could imagine more complicated scenarios, such as selecting rows to be transferred to a table different from the one that is being viewed.

How it behaves (once setup)

In this example, the end-user performs ad-hoc bulk deletion of data in a storage table.

The user starts by opening the data view page of the storage table. Let’s say the user needs to bulk delete all rows where Location = ‘CAN’ and Period = 2018. The user sets the column filters correctly to retrieve the data that needs to be deleted. 628 rows have been selected.

filter data

To process the selected rows, the user presses the “Run Pipeline” button (right-pointing arrow icon) above the table and then presses the “Delete Viewed Data” button. Note that the text of the “Delete Viewed Data” button is just the pipeline’s origin Title property and is therefore configurable.

open pipeline launcher

This creates a new normal batch on the load page. If the pipeline origin requires user input, the user can enter the input at this point.

load page

Pressing the Preview button opens the batch preview page. We can see that the batch is prepared to soft-delete 628 rows matching the filter criteria (Location = ‘CAN’, Period = 2018).

batch preview

Commit the data.

How to set it up

It’s a 2 step process. In step 1, on the data view page, you register 1 or more pipeline origins in the “Run Pipline” popup. In step 2, in the source code of the pipeline, in the filter of a GetMart or DataScope command, set InheritFromDataView to true.

The PIPELINE_MANAGE permission is required to perform these steps.

Step 1 - Data View Page

To add 1 or more pipeline origins to the “Run Pipeline” popup, go to the data view page and click the run pipeline button (right-facing triangle or “play” button). When the popup opens, a button with text “+ Add a pipeline’s origin to run” should be visible. If the button is not visible it probably means that you don’t have PIPELINE_MANAGE permission (this button is hidden for users who do not have PIPELINE_MANAGE permission). Click this button to select a pipeline’s origin from the list that appears.

batch preview

One or more pipeline origins may be selected at a time. Press the Update button to save the configuration.

batch preview

Step 2 - Pipeline Page

In this step, in the source code of the pipeline that was just registered, we set InheritFromDataView to true for either the GetMart command or the DataScope command.

Adding InheritFromDataView to GetMart

The GetMart command extracts data from a storage table or view. Set the TableCode of the GetMart command to the same table or view that is being viewed on the data view page. In the Filter section of the GetMart command, set the InheritFromDataView property to true.

pipeline source code

When the pipeline is launched from the data view page, the active filters set by the end-user will be applied to the GetMart command and only the data being viewed will be extracted for processing.

If the pipeline is launched in another way, ie not from the data view page, the InheritFromDataView setting will be ignored and have no effect.

This particular pipeline proceeds to set the system _Delete field to true, to mark the viewed rows for soft deletion. But any other type of transformation is of course possible here.

Adding InheritFromDataView to DataScope

InheritFromDataView can also be set in the Filter of the DataScope command. In this case, the batch created would only be able to modify data that is within the range defined by the user on the data view page.

For example, it could allow a user to bulk process values for a particular indicator code and year.

Important note: because the DataScope defines the range of data which can be modified, the pipeline should not modify the filter values themselves, which would make them out-of-scope. In this case put InheritFromDataView in the GetMart command rather than in DataScope.