# Merge

"**Merge"** is a task that is used when you have two or more datasets coming from different sources and want to merge them into one dataset.

These are the possible resulting options for the merge:

* If two rows have the same values in all fields enumerated in this parameter, they will be merged.
  * If you add a field "id" — the block will merge rows with the same IDs,&#x20;
  * If you add fields "id" and "name" — rows with the same ID and name will be merged.
* If you leave key field names empty, all rows from all datasets will be merged.&#x20;

<figure><img src="/files/QGyk5eo7AkuzHAXbOrcS" alt=""><figcaption></figcaption></figure>

In the following examples, items with the same `id` and `type` will be merged into one:

<figure><img src="/files/MLDatzzKB0PgvLnxATwf" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ylem.co/pipelines/tasks-ip/merge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
