> For the complete documentation index, see [llms.txt](https://documentation.astera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.astera.com/dataprep/transforming-data/route.md).

# Route

In this document, you will explore how to route datasets in Astera Dataprep. A Route transformation routes the data to multiple datasets based on custom decision logic expressed as rules or expressions. This allows the creation of multiple sub-datasets from the main dataset with records being directed to different datasets based on specified conditions.

1. Open a Recipe in Astera Dataprep.

![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FVdbGNfAGAmCruezJwH06%2F0.png?alt=media)

2. Navigate to the Toolbar and select *Transform > Route*.

![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FihEAEVreH5hgWwLL8vu6%2F1.png?alt=media)

3. Configure the following options in the recipe action in the Recipe Panel:

<img src="https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FBsepgPnGCnFNEFOV6jAw%2F2.png?alt=media" alt="" width="464">

* **Default Dataset Name**: This dataset contains all the records not passing any rules defined in the Route transformation expressions. It is required to set a name for the Default Dataset here.
* **Dataset Name**: The name of the dataset that will contain data for the records that pass/fulfill its specific expression's requirements.
* **Expression**: Enter an expression (e.g., Region = ‘North’) or any condition you want to apply to your data. Each Route expression you add here will create its own Dataset based on whether the records satisfy the expression.

4. In the Route Properties, click on the expression text entry box to enter an expression. You can enter the expression here or click the ![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FNEDqydPib8PgrV5WySDO%2F3.png?alt=media) button to open the expression builder. Click ![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FtyRVM58ej0cA4VX2viNM%2F4.png?alt=media) to approve and apply the expression.

<img src="https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FAtqlzu6wvMV9IBtwVrSQ%2F5.png?alt=media" alt="" width="405">

5. In this example, we have created three datasets based on the value in the *Region* field: one for *North\_Region*, one for *South\_Region*, and a default dataset named *Other\_Region*. Each dataset has an associated expression that routes records accordingly. \
   Records where the *Region* is *"North"* are sent to *North\_Region*, those with *"South"* go to *South\_Region*, and any records that do not match these conditions are routed to the default dataset, *Other\_Region*.

![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FLcqcFDaa3K9p1gQrwyXU%2F6.png?alt=media)

6. Click *Apply* ![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FO27YZMLf48lb7zdMRAfG%2F7.png?alt=media) to apply the changes or *Cancel* ![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FRXofxwlGCUvro9hSuy8d%2F8.png?alt=media) to discard them.
7. Once you click *Apply*, the routed datasets are created and by default, the first Route Dataset (here: *“North”*) is previewed on the grid.

![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FUEJEOg2K3AIvioRjhbyV%2F9.png?alt=media)

8. The other datasets can then be read using the [Read Dataset](/dataprep/reading-sources/reading-a-dataset.md) recipe action.

<img src="https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2FUs8PFS00XqM2S9gghxxt%2F10.png?alt=media" alt="" width="383">

![](https://3181888596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzEifS4h8yurLAAwiGNX2%2Fuploads%2Fkg9c34BuCLS11kYauiMB%2F11.png?alt=media)

This concludes the document on using Route in Astera Dataprep.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.astera.com/dataprep/transforming-data/route.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
