---
docId: doc_63f5b4b0292f44daa85f008189a41503
title: 'Choose tables and columns'
description: 'Limit the data available to your agent, save the rules and check the result.'
---

# Choose tables and columns

After [connecting a database](/help/integrations/functions/database), decide which tables and columns the agent needs. For example, allow it to query an order's status while hiding internal notes.

Open the connection in **Integrations → Functions → Database → Tables and columns**.

<span id="elegir-los-datos-disponibles"></span>
<span id="si-no-puedes-elegir-una-tabla-o-columna"></span>


![Connection tables and columns](/images/screenshots/manuales-piloto/integraciones/pantallas-completas/en/tablas-y-columnas.webp)

## Choose the available data

1. Search for the table by name or description.
2. Turn its switch off to hide the entire table.
3. To hide only certain columns, open the table and turn their switches off. Keep the table enabled.
4. Click **Save** in the editor.

Enabled switches indicate available data. Hiding a table also hides its columns. You can enable it again when you want to restore access.

Saved rules affect agents using this connection, without publishing another agent version. They complement database permissions: keep a read-only user with access only to the required data.

<span id="comprobar-el-resultado"></span>

## Check the rules

In **Test your database**, run a query using available columns. If you try to query a hidden table or column, the connection rejects that access.

When a table has hidden columns, `SELECT *` is not allowed. Name the columns you need and limit the requested rows.

The panel tests saved rules. Save pending changes before checking them.

<span id="actualizar-el-catálogo"></span>

## Refresh the catalog

Click **Refresh** when your team adds tables or changes their structure. The catalog is read from the saved connection; if you changed the host or other settings without saving, it will still use the previous configuration.

This catalog includes hidden items so you can change their rules. Agent tools present only the available items.

<span id="siguiente-paso"></span>

## If a table or column is missing

Check the selected database, its user's permissions and the password. Fix access and refresh again.

The catalog returns up to 500 tables, and each table description returns up to 500 columns. You can hide up to 500 tables and up to 500 individual columns; these are separate limits.

If you reach a limit or a name has a disabled switch, restrict access through the database user's permissions.

Return to [Connection and testing](/help/integrations/functions/database#comprobar-el-acceso) to assign its tools to the agent.
