# Profiling a database

A database profile is a thorough analysis of the data and its structure. Each table has its own profile.

The Data Agent consults the profile whenever it needs to understand the content or structure of a table. For example, when it adds data to a table, the Data Agent uses the table profile as a guide.

You can also prompt the Data Agent to use a profile to guide data generation. For example, for a live connection database, you can generate data to one database connection based on the profile of another database connection.

## Creating and updating a database profile <a href="#profile-create" id="profile-create"></a>

When it needs to use profile information, but there is no profile, then the Data Agent automatically creates one.

The Data Agent also automatically updates the profile to reflect changes to the data structure. For example, if you add columns or if you make changes to the distribution of values, then the Data Agent updates the profile.

To manually profile a database, prompt the Data Agent. For example:

`Create a profile of the transactions database.`

## Viewing a table profile <a href="#profile-view" id="profile-view"></a>

For an individual table, findings view displays the profile for the table.

The profile details page provides access to the profile information for all of the tables.

### Displaying findings view for a table <a href="#profile-findings-view" id="profile-findings-view"></a>

To display the findings view for a table:

1. In the navigation panel, display the table list for a database or data connection.
2. In the table list, click the table.
3. In the table heading, click the findings icon.

<figure><img src="/files/OLNYEcAVc1xEj2ereNsC" alt=""><figcaption><p>Findings view for a database table</p></figcaption></figure>

### Displaying the profile details page <a href="#profile-details-page" id="profile-details-page"></a>

To display the profile details page in the navigation panel, under **Profiles**, click the profile to display.

By default, the profile details page displays the the profiles for all of the tables.

<figure><img src="/files/rZfp1lcyrBYX4lb06frF" alt=""><figcaption><p>Profile details page displaying the profiles for all tables</p></figcaption></figure>

To display the profile for a specific table, in the profile header, click the table name.

## What's in a profile? <a href="#profile-content" id="profile-content"></a>

Each profile includes:

* Table DDL.
* **Correlation of columns.** For example, a transaction date and transaction identifier are likely to be tightly correlated. Or the total cost of an order is the sum of each order item cost times the order item quantity.
* **Cardinality of column values.** For example, most orders have 1 item, fewer orders have 2 items, and even fewer orders have more than 2 items.
* **Constraints on columns.** For example, the same order cannot have a duplicate product identifier. All timestamps must use the ISO 8601 format.&#x20;
* **Distribution of column values.** For example, customer addresses are distributed across 20 states.

## Exporting a profile

From the profile details page, you can export a profile. Fabricate creates and downloads a JSON file that contains the profile.

You can then use the profile as the basis for another database.

To export the profile, on the profile details page, click **Export**.

You can also use the Data Agent chat to request the export. For example: `Export the Retail database profile.`


---

# Agent Instructions: 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:

```
GET https://docs.tonic.ai/fabricate/data-agent-tools/data-agent-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
