> 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/astera-studio/chat/preparing-data-from-chat.md).

# Preparing Data from Chat

A Dataprep recipe in Astera Studio is a saved sequence of transformation steps — filtering, joining, aggregating, computing columns, and writing output — built on top of your source files or database connections. You can build one manually in the Dataprep editor, or ask the AI in chat to build one for you. Chat is the fastest way from 'I need clean, aggregated data' to a saved, runnable Dataprep artifact.

In this article, we will learn how to ask chat to create a Dataprep recipe, what the generated result looks like, how to refine and update the recipe, how to save it to your workspace, and how to run it to produce output files.

## Creating a Dataprep Recipe from Chat

Dataprep recipes work best when the AI has the source data on hand. Attach the Source File or Database Connection first, then describe the transformations you need.

1. In a new or existing chat, attach one or more data references using + or @-mentions. Typical sources: an Excel or CSV file in Source Files, a Database Connection, or an existing Dataprep that already cleans the data.
2. Type your request in plain language. Be specific about what you want to do.

![](/files/540c6f4480363811be81ee7146881dde261251e9)

3. Send the message. A task tracker appears showing the AI's plan.
4. When the tracker reaches DONE, Creates or opens a Dataprep (.Dp) file in the workspace.
5. Generates an ATL script covering all requested transformations and compiles it into a visual pipeline — each transformation becomes a connected step card (Read File → Filter → Join → Aggregate → Write) on the canvas.
6. Previews the output — by default, it previews the last step, showing live row counts and output columns. You can click any step card and hit Preview to inspect the data at that exact point in the pipeline.
7. Leaves the file open in the editor for you to review, tweak, and save.

![](/files/8166e7a56ab08c47d23805b3d1a629bc430ebb93)

{% hint style="info" %}
**Tip:** vague prompts produce vague recipes. Tell the AI what columns to use, how to compute derived fields, and where to write the output. The clearer the spec, the closer the first draft will be to what you need.
{% endhint %}

## The Dataprep Interface

When the assistant builds a recipe, it opens a Dataprep file in the right-hand panel. The toolbar at the top gives you control over how you view and interact with your pipeline.

### View controls

* **Pipeline only** — Each transformation step appears as a connected node (Read File → Filter → Join → Aggregate → Write), giving you a bird's-eye picture of the full pipeline flow.
* **Split view** — Shows the pipeline and a live data table side by side, so you can see both the structure and the output at the same time.
* **Preview only** — A preview-centric, Excel-like interactive grid that updates in real time as you make changes.
* **Zoom controls** — Zoom in and out on the pipeline canvas to navigate larger recipes.

### Actions

* **Script** — Every Dataprep recipe is backed by an ATL (Astera Transformation Language) script written in readable, plain-English-style syntax. Click Script to view the full script and use the Copy button to share it externally or send it to a colleague for reference.

![](/files/cf78218fbe9e3a03819f19d3e91c0f5ea7a20036)

* **Preview** — Select any step card in the pipeline and click Preview to see the data as it looks up to that point. By default, it previews the output of the last step.
* **Run** — Executes the full pipeline from start to finish, applying every transformation to your source data and writing the result to the configured output.

## Saving the Recipe to the Workspace

A generated recipe lives in the editor but is not persisted until you save it. To keep the recipe around — so you can @-mention it later, run it on a schedule through an Automation, or share it through the Catalog — save it into the workspace's Dataprep category.

Click Save in the toolbar after reviewing the recipe. The file is saved as a .Dp file under the Dataprep folder in your project.

## Refining the Recipe

After the first draft is generated, you can iterate directly in chat. Ask follow-up questions or request changes and the AI will update the ATL script in place:

* 'Also sort the results by TotalRevenue descending.'
* 'Rename the Region column to ShipRegion.'
* 'Add a filter to exclude orders from Germany.'
* 'Change the output path to the Reports folder.'

Each update recompiles the script and refreshes the preview automatically, so you can see the effect of every change before running the full pipeline.

## Running the Recipe

Once the recipe is saved, you can run it at any time to process fresh source data and produce the output file. There are two ways to keep output up to date:

* Manual run — Click Run in the toolbar. All steps execute in sequence and the output file is written to the configured destination.
* Scheduled run — set up an Automation in the Automations module on your desired trigger or event. Run it on a schedule (every morning at 8 AM, every Monday, etc.) so the output is always current without any manual intervention.

To conclude, this is how you go from a chat request to a saved, runnable Dataprep recipe in Astera Studio. Attach the data, describe the transformations, refine until it's right, save to the workspace, and trigger it manually or on a schedule when you're ready to produce output.


---

# 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://documentation.astera.com/astera-studio/chat/preparing-data-from-chat.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.
