# Join Using a File

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

### Use Case

In this use case, we have a Dataprep Recipe where a Company’s *Transactions* dataset has been cleansed and aggregated. Now, they want to join it with their *Portfolios* dataset, which is available in a csv file.

![](/files/6jaE0eM1odljFNlhMfJk)

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

![](/files/klIdcmQExQT9zloJkeHf)

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

![](/files/sdE7GlN3MprQM8s3EywV)

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

<img src="/files/dswYsoj7X23d9B6kPeSe" alt="" width="380">

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

* **File Location:** Choose how you want to locate your file:

  * **Browse Path**: Use this to manually browse and select your source file.
  * **Path from Variable**: Use this when your file path is dynamic and parameterized. To learn more about parametrization click [here](/miscellaneous/parameterization.md).

  For this use case, we’ll use the *Browse Path* option.
* **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.

<img src="/files/RbC9HHyahSQvbMKQVhcs" alt="" width="365">

* **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 joined dataset. Unmatched records from the joined dataset are filled with nulls.
  * **Right Outer**: Keeps all records from the joined dataset 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.

<img src="/files/ffLnhX4LK1Vvl9NgN8fi" alt="" width="376">

* **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 joining dataset.

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

<img src="/files/OsMVPD9bBKskjfSxHD1P" alt="" width="365">

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

![](/files/BAx4ziMMlRYIcvUCX2JG)


---

# 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-file.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.
