> For the complete documentation index, see [llms.txt](https://resources.less.tech/less-tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.less.tech/less-tech/modelling/action-guides/merge/combine.md).

# Combine

<figure><img src="/files/7gCa0bo4GPYZmKvSXhu5" alt=""><figcaption><p>The Combine Action</p></figcaption></figure>

It's very important to understand how to use the Combine Action if you want to begin working smarter with data. The Combine Action enables you to turn two sets of data into a single unified data set. You do that by selecting the type of Combine you want to use and by pointing to common IDs in each of the two data sets.&#x20;

The combine function is called a join in SQL and a merge in Python. Watch the video to see a few use cases and read more about combine types below the video.

{% embed url="<https://www.loom.com/share/abd94b8d648543f9a1cfb1888a31bdab>" %}

### **Combine Types**

#### **Inner**

The inner join combines data sets only when the common ID can be found in both data streams. In the figure, you'll see a visualisation of the inner join. The only record that is present in Table 1 and Table 2 is the record 1. Therefore this is the only one that will be combined in the output table to the right in the visualisation below. Use this type if you only want to output records that are present in both data stream going into the Combine Action.

<figure><img src="/files/OHkxgN7iMKlkBKwNrcsM" alt=""><figcaption><p>The Inner Join (<a href="https://link.less.tech/join-types">https://link.less.tech/join-types)</a></p></figcaption></figure>

**Left/Right**&#x20;

The left and right type are opposites. In the visualisation below, you'll see a left join. The left join outputs all the records from the left data table (*Table 1*) independent of whether they can be matched in the right data table (*Table 2*). The ones that can be matched from the right Table 2 will be present in the output. Below, we can see that record 1 and 2 from Table 2 are both in the output left join table. The yellow columns will be present in the output table due to the fact that record 1 is present in both Table 1 and 2. For record 2, the cells are blank because the record doesn't match with any records in Table 2.

<figure><img src="/files/yk9OXFmlSGDrCUscZQib" alt=""><figcaption><p>​The Left Join (<a href="https://link.less.tech/join-types">https://link.less.tech/join-types)</a>​<br></p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://resources.less.tech/less-tech/modelling/action-guides/merge/combine.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
