# Join Using a Source

In this document, you’ll learn how to use the *Join* function in Astera Dataprep to combine a dataset from a project source with an existing dataset in your Dataprep Recipe.

### Use Case

In this use case, we have a Dataprep Recipe where a company’s *Customers* dataset has been cleansed. Now, they want to join it with their *Orders* dataset, which is available in a shared project source.

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

1. To begin, click on the *Join* option in the toolbar and select *Source* from the drop-down.

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

2. Alternatively, you can drag and drop the project source from the *Data Source Browser* panel onto the *Join* object in the Recipe canvas.

<figure><img src="/files/2cK1N6qfoMB7BfYaijhU" alt=""><figcaption></figcaption></figure>

3. This will open the *Recipe Configuration – Join* panel.

<figure><img src="/files/lZh1qM5ddcDLBfD37Osb" alt="" width="387"><figcaption></figcaption></figure>

4. In this panel, you’ll configure the following options:

* **Filter Source:** Choose the type of source you want to use. You can filter by type or simply select *All*.

<figure><img src="/files/oBi3nPD0PStRcGEHceA6" alt="" width="347"><figcaption></figcaption></figure>

* **Shared Source:** From the drop-down, select the project source dataset you want to join.

<figure><img src="/files/rRj7uBfoJJ4SMFndpZ2W" alt="" width="362"><figcaption></figcaption></figure>

* **Join Dataset:** You can provide a custom name for the joined dataset or keep the default name. In this example, we’ll keep the default name.

<figure><img src="/files/tkbQHiVvEr7RA9eMNbCu" alt="" width="350"><figcaption></figcaption></figure>

* **Join Type:** Choose the type of join you want to perform:

  * **Inner:** Keeps only the records that have matching values in both datasets.
  * **Left Outer:** Keeps all records from the current dataset and adds matching data from the project source. Unmatched records from the project source are filled with nulls.
  * **Right Outer:** Keeps all records from the project source and adds matching data from the current dataset. Unmatched records from the current dataset are filled with nulls.
  * **Full Outer:** Keeps all records from both datasets. Unmatched values are filled with nulls.

  In our example, we’ll use an *Inner join* to include only matching records.

<figure><img src="/files/T6h3AGetMnNUMZFu6JDq" alt="" width="376"><figcaption></figcaption></figure>

* **Keys:** Specify the key fields that the join will be based on. Astera will auto-detect matching fields, but you can modify them as needed.
  * **Left Field:** Field from the current dataset.
  * **Right Field:** Field from the project source dataset.

In this case, we’ll keep the default key fields selected.

<figure><img src="/files/ILU0ZmGk6eWL13Lbrgw6" alt="" width="369"><figcaption></figcaption></figure>

5. Once you’re done, click <img src="/files/MoI3HgBFnNJT7Jgo3HNm" alt="" data-size="line"> *Apply.* The project source dataset will now be joined, and the result will appear in the grid.

<figure><img src="/files/nKsoR5vxeppByqGERrRR" 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://documentation.astera.com/dataprep/joins/join-using-a-source.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.
