# Split

Divide a dataset into multiple branches based on selected fields or conditions.

The **Split** feature in **Flow Transformation** lets you break a large dataset into smaller, structured pieces that you can process independently in the next steps of your flow.

> This is especially helpful when a connector returns a large table or a complex object, and you only want to work with **specific portions,** such as selected columns, targeted attributes, or filtered sections of the data.

### **Use Case Example**

Imagine you have a Google Sheet storing thousands of rows of product data (Name, Category, Price, Stock, etc.). You only want to extract **specific columns**, for example, **Category and Price**, to send into another system (like an AI step, analytics tool, or external API).

Instead of passing the entire sheet, the **Split** feature lets you carve out only the fields you need.

Using **Includes Only**, you can split the dataset so only the selected fields move forward, simplifying your next steps and making your flow more efficient.

### Step 1: Add a Connector

* Start your flow by adding a connector that contains the data you want to split.

Add a ***Google Sheets*** Connector and select the action ***getDataFromSheet***.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FTcYiplhxIIIsjDxs6coQ%2Fimage.png?alt=media&#x26;token=35e6321d-969b-444c-a607-9c5c4ed80e09" alt=""><figcaption></figcaption></figure>

* This step retrieves all the data from your sheet and provides it as the output for the next steps.

### Step 2: Add the Split Transformation

* After your connector step, click the '+' button to insert a new step.
* Search for **Flow Transformation Actions** and select **Split**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F6K9D0ytN8TDMskd2R3YJ%2Fimage.png?alt=media&#x26;token=2765f25e-7df5-4de4-8f5e-818c63ea32a9" alt=""><figcaption></figcaption></figure>

* The Split step divides the data based on the input field and strategy you choose. Configure the Split step as follows:

**Fields To Split Out**

{{steps.getDataFromSheet.output}}

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FFPCrgs9nIB0hqcq02Eir%2Fimage.png?alt=media&#x26;token=cabecc13-771d-4a23-a1b7-85f5a7351592" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*This references the output from the previous connector step.*
{% endhint %}

**Split Out Strategy**

The **Split Out Strategy** lets you decide whether to include only certain fields or exclude certain fields. &#x20;

As an example, we will choose the *Includes Only* Strategy in this scenario.

{% hint style="info" %}
You can choose Includes Only or Excludes Only, depending on your use case.&#x20;
{% endhint %}

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FRqVi7WjL3OcgHmcq9hzg%2Fimage.png?alt=media&#x26;token=8742157b-e56e-4bcc-9408-c2efc44239b1" alt=""><figcaption></figcaption></figure>

**Input Fields**

You can select any input field you want to use for splitting, like the Major Dimensions of the data from the sheet, in this case.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FNEM9PKf3kuaRFRPOza2N%2Fimage.png?alt=media&#x26;token=c7db70f1-1286-4ef2-88fb-5a96cb396bfb" alt=""><figcaption></figcaption></figure>

Save the step.&#x20;

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FTHqRFEDgksa7GOukTzpF%2Fimage.png?alt=media&#x26;token=24375f03-1493-4aa3-840b-f4faf245e720" alt=""><figcaption></figcaption></figure>

### Step 3: Testing the Split Step

You can test the split step to ensure it works as expected:

* Test the step directly from the **Test** inside the Split step.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FQtTEUyzPQbI8ZQuzthOb%2Fimage.png?alt=media&#x26;token=f942218e-1dbe-4473-8d04-f8a6e8af79fd" alt=""><figcaption></figcaption></figure>

* Next, test the entire flow from the **Test** button at the top-right corner of the flow editor.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FPV9bG4EECePJfQCJCHrd%2Fimage.png?alt=media&#x26;token=55f1716e-51fe-452e-a24d-331c2c4828ca" alt=""><figcaption></figcaption></figure>

### Using Split Data

Once the split step is configured, the resulting data can be used in further steps of your flow.&#x20;

For Example:

* Passing specific fields to another connector for processing.
* Filtering the dataset based on certain dimensions before performing calculations.
* Using split data as input for AI agents or custom code steps.
