# Discover metadata

Introspect a source's schemas so Amfelt can generate its data contract.

Discovery is the step where Amfelt learns what a source contains. The agent connects to the source, reads its structure (namespaces, objects, properties, types, keys, and relations) and profiles the data it finds. The result is one data contract per source, describing each of its objects, versioned in your project's Git repository.

Nothing moves yet. Discovery reads structure and produces a description; moving data is what a job does later.

![The page of the jaffle data source with a Rediscover button and a note that its tables were read three days ago, above its slug, type and host settings.](demos/guides/sources-discover-metadata-light.png)
{mode="true" class="guide-image"}

## Run it

Open the source and choose **Discover schema** (**Rediscover** once discovery has run). The work is dispatched to the agent over its channel connection, so the agent has to be connected for anything to happen.

If the project has no agent assigned, discovery does not start and says so. Assign an agent to the project first. See [Register an agent](/docs/guides/cli/register-an-agent/).

## While it runs

Discovery is not instantaneous on a large source. The status panel reports progress and, when it finishes, the version it produced. On a long-running discovery you can leave the page and check the catalog later; the run continues without you.

If it reports that it is still working for longer than you expect, that is a report about the source's size or responsiveness, not an error.

## Re-running discovery

Run discovery again whenever the source changes. Each run produces a new contract version rather than overwriting the previous one, and the differences between versions are recorded as schema-drift events you can review. See [Review schema drift](/docs/guides/catalog/review-schema-drift/).

Re-running is also how you pick up a source that has gained tables since you onboarded it.

## What you have afterwards

The source's objects appear in the [catalog](/docs/guides/catalog/explore-the-catalog/) with their properties, keys, and relations, and they become selectable when you configure what a job moves.

## Next

[Review the data contract](/docs/guides/sources/review-the-data-contract/) before you move anything.
