> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.syncspider.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Rows to Collection Field - Help Center - SyncSpider

**TABLE OF CONTENTS**

* [Description](#Description%C2%A0)
* [Key Features:](#Key-Features%3A)
* [Use Case Example: CSV to DataHub Integration](#Use-Case-Example%3A-CSV-to-DataHub-Integration)
* [Step-by-Step Configuration](#Step-by-Step-Configuration)
* [Step 1: Add a Rows to Collection Field](#Step-1%3A-Add-a-Rows-to-Collection-Field)
* [Step 2: Configure the Field](#Step-2%3A-Configure-the-Field)
* [Step 3: Save and Apply](#Step-3%3A-Save-and-Apply)
* [Additional Resources](#Additional-Resources)

## Description

The **Rows to Collection Field** is a powerful custom field within SyncSpider, designed to handle complex data mapping scenarios. Specifically, it allows you to group multiple rows of related data into a single collection, which can then be mapped as a unified entity. This feature is particularly useful when working with tasks that involve multiple line items per order or similar structured datasets.

---
## Key Features:

* Combine multiple rows of related data into a single collection.
* Select specific fields to include in the collection (minimum of two fields required).
* Define unique identifiers (UIDs) to group related data.
* Handle datasets where rows are dynamically grouped by a shared UID.

---
## Use Case Example: CSV to DataHub Integration

Imagine you have a CSV file containing order data, where each order consists of multiple line items. Each order is identified by a shared `Order ID`, and the line items are listed in separate rows. Your goal is to import this data into DataHub, ensuring that all line items are grouped together under their respective orders.

###

Example CSV Structure:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/5/8/fa5894da4f232000/202404be-1d74-4cab-a517-6c76c0_9b313q.png)

Using the Rows to Collection Field, you can:

1. Group all rows with the same Order ID into a single collection.
2. Include Order properties and Line Items SKU fields in the collection.
3. Map the collections to DataHub, where each order is represented as a single entity with its associated line items.

---

## Step-by-Step Configuration
### 
### Step 1: Add a Rows to Collection Field

On the Mapping screen, navigate to the **Custom Fields**section.

![](https://storage.crisp.chat/users/helpdesk/website/-/6/5/0/8/65085dd0cca14c00/fc0e93cb-0eff-4657-a462-c5f8bc_17nwxwo.png)

Select **Rows to Collection Field** from the list of available custom fields.

![](https://storage.crisp.chat/users/helpdesk/website/-/2/8/9/0/289086f1ad1fd800/d4618a79-fdc6-40e0-86ac-6e43be_198m4q6.png)

---
### Step 2: Configure the Field

![](https://storage.crisp.chat/users/helpdesk/website/-/8/7/0/f/870f050386828800/390f5bc4-559f-45e4-9a51-be1137_11amfdq.png)

1. **Name**: Provide a descriptive name for the field, such as Order Line Items
2. **Select UID Field**: Choose the field that will serve as the unique identifier for grouping rows.
3. **Fetch Until Next UID**: If your dataset includes rows without repeated UIDs, enable this option to group rows dynamically until the next unique UID appears.
4. **Select Fields to Add to Collection**: Choose the fields you want to include in the collection. **Note: A minimum of two fields must be selected to proceed.**

### 
### Step 3: Save and Apply

Click **Done** to save the field configuration.

Map the Rows to Collection Field to the corresponding target field in DataHub.

---
## Additional Resources

**Learn more about SyncSpider's capabilities and how to use custom fields with these additional resources:**

* [Simple Collection Field](https://support.syncspider.com/en/support/solutions/articles/3000116452)
* [Conditional Field](https://support.syncspider.com/en/support/solutions/articles/3000116453)
* [Custom Fields](https://support.syncspider.com/en/support/solutions/articles/3000115871)

---

---

To check the list of the tools and features we support please click [here](https://syncspider.com/integrations/)!

If you don't see your favorite tool on our list, please take the time and send us the request [here](https://roadmap.syncspider.com/boards/integrations?sort=cached_votes_up) to create an integration for you or UP-vote if it's already on the list :)

We develop integrations based on the requests and up-votes :)

We hope that this covers everything. If you have any further questions or need additional clarification please reach out to us via [[email protected]](/cdn-cgi/l/email-protection#f5868085859a8781b5868c9b9686859c919087db969a98) or our chat widget!