Use the Append Variable activity in Fabric

Use the Append Variable activity to add a value to an existing array variable defined in a Fabric pipeline.

Prerequisites

To get started, you must complete the following prerequisites:

Add an Append Variable activity to a pipeline with UI

To use an Append Variable activity in a pipeline, complete the following steps:

Creating the activity

  1. Create a new pipeline in your workspace.

  2. Before you use the Append Variable activity, you need an array type variable in your pipeline. First select the pipeline canvas background, so the pipeline settings appear on the lower part of the screen. There, select the Variables tab, and then select + New, to add a variable of Array type.

    Screenshot showing the creation of a new array type variable to a pipeline.

  3. Now that you have an array type variable in your pipeline, search for Append Variable in the pipeline Activities pane, and select it to add it to the pipeline canvas. You may need to expand the list of available activities using the dropdown + button at the far right of the toolbar.

    Screenshot of the Fabric UI with the Activities pane and "Append Variable" activity highlighted.

  4. Select the new activity on the canvas if it isn't already selected.

    Screenshot showing the General settings tab of the "Append Variable" activity.

Refer to the General settings guidance to configure the General settings tab.

Append variable settings

Select the Settings tab, then use the Name dropdown to select your previously created array type variable. You can also use the + New button to create a new variable in the pipeline directly if you didn't create one previously. Provide data to be appended to the array variable. You can use dynamic expressions here or directly enter data, of which the type is always string.

Screenshot showing the "Append Variable" activity settings tab, highlighting the tab.

Save and run or schedule the pipeline

Although Append Variable is typically used with other activities, it can be run directly as is. To run the example pipeline here, switch to the Home tab at the top of the pipeline editor, and select the save button to save your pipeline. Select Run to run it directly, or Schedule to schedule it. You can also view the run history here or configure other settings.

Screenshot showing the Home tab in the pipeline editor with the tab name, Save, Run, and Schedule buttons highlighted.