> 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/reading-sources/reading-a-database-table.md).

# Reading a Database Table

Astera Dataprep makes it easy to connect to and work with databases. You can connect, browse, and start preparing your data within a few clicks.

### Option 1: Read a Database Using Chat

1. Start by creating a database connection as a shared action in your project. This allows you to reuse the connection throughout your project.\
   To learn how to create a database connection, click [here](/miscellaneous/shared-actions.md#use-case-1-database-connection-as-a-shared-action).
2. Ask in chat to read your desired table.

![](/files/36vSSXN6QzsmVchekenF)

This approach is ideal if you prefer working through natural language and want to quickly load data from your connected databases without manual browsing.

### Option 2: Use the Data Source Browser

1. Open the *Data Source Browser*.

![](/files/qQQPYdGvVyXQW2yTqFoN)

2. Click the *Add Data Source* dropdown and choose *Add Database Connection*.

**Note:** When working with Astera Cloud, local (on-premises) databases will not be accessible.

![](/files/SgIblLmolpks2EX5WCnW)

3. Once your connection is added, browse through the list of tables and simply drag and drop the required table into your dataflow.\
   \
   This creates a *shared action* automatically in your project ready to be used for reading.

![](/files/UWwDbmmBBwononoZWDPf)

The table is now ready for filtering, cleaning, or transforming, just like any other dataset.


---

# 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/dataprep/reading-sources/reading-a-database-table.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.
