# Data console

> Browse tables, rows and cache keys, and run SQL or Valkey commands against a managed datastore from the Data tab in the dashboard. Read-only by default, write mode for owners and admins.

Every managed [Postgres](/docs/data/postgres) database and [Valkey cache](/docs/data/valkey) has a **Data** tab. It is a small database client inside the dashboard: browse what is there, run a query, fix a row, without installing a client or copying credentials.

## What the Data tab shows

**On a Postgres database:**

- **Tables**: every table in the database, with row counts. Click one to page through rows, search, filter by column and sort.
- **Row detail**: click a row to see every column, including long text and JSON, formatted.
- **SQL**: a console that runs the statement you type and shows the result as a grid. Use **Query in console** from the table view to start from a `SELECT` on that table.

**On a Valkey cache:**

- **Keys**: browse keys of every type (strings, hashes, lists, sets, sorted sets, streams) with pattern search, and open one to see its value and TTL.
- **Console**: run one Valkey command at a time, with the reply shown as the CLI would print it.

## Read-only and write mode

The console is **read-only by default**. Every statement is planned and classified before it runs; in read-only mode anything that would change data is rolled back and the console tells you so ("Read-only, nothing is saved").

Owners and admins can flip the **Write** switch in the console to commit changes. Statements that drop or truncate ask for a second confirmation. The switch is per session and drops back to read-only if your role changes.

Every statement run from the Data tab is recorded in the datastore's [logs](/docs/observability/logs) as text, never with results, so the team can see who ran what.

## Requirements

- The datastore needs **Public access** on. The console connects over the datastore's public, TLS-encrypted hostname. If public access is off, the tab shows **Public access is off** with a button to turn it on.
- A paused datastore shows **Paused**; a sleeping one shows **Asleep** with a **Wake** button. Opening the console wakes it.
- Members can read; only owners and admins can write. See [Organizations and roles](/docs/organizations).

## From the terminal instead

If you would rather use `psql` or `valkey-cli`, [`okctl connect <id>`](/docs/deployments/shell#connect-to-a-database-or-cache) opens a tunnel and drops you into the right client with the credentials filled in. Add `--tunnel-only` to keep the tunnel open for a GUI client.

- [Postgres](/docs/data/postgres)
- [Valkey cache](/docs/data/valkey)
- [Shell and SSH](/docs/deployments/shell)

---

**Don't see a feature you need?** Email [support@ownkube.io](mailto:support@ownkube.io?subject=Feature%20request). Ownkube is shaped by the teams using it and we ship what our users ask for.

## Search

This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_c64dfe8ffaa8d3ad19576838&query=<URL-encoded question>. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.
