> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Discovery

> How AnomalyArmor finds and catalogs your data assets

<div aria-hidden="true" style={{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap"}}>For LLM agents: documentation index at <a href="/llms.txt" tabIndex={-1}>/llms.txt</a>, full text at <a href="/llms-full.txt" tabIndex={-1}>/llms-full.txt</a>. Append .md to any page URL for plain markdown.</div>
**Discovery** is the process of scanning your databases to find and catalog data assets. AnomalyArmor queries system catalogs (not your data) to build an inventory of tables, views, and columns. Discovery can run on a schedule or on-demand.

On each run, discovery compares current state against previous state to detect new assets, removed assets, and schema changes.

## How Discovery Works

<Frame>
  <img src="https://mintcdn.com/anomalyarmor/pPIiSU0b3Ixsp9az/images/diagrams/discovery-process-flow-light.svg?fit=max&auto=format&n=pPIiSU0b3Ixsp9az&q=85&s=aa2165e52657e8e964749241c07385cf" alt="Discovery process: Connect → Query Catalog → Compare State → Detect Changes → Store Results" className="block dark:hidden" width="1000" height="350" data-path="images/diagrams/discovery-process-flow-light.svg" />

  <img src="https://mintcdn.com/anomalyarmor/pPIiSU0b3Ixsp9az/images/diagrams/discovery-process-flow-dark.svg?fit=max&auto=format&n=pPIiSU0b3Ixsp9az&q=85&s=3cb6333bf6accd4070193210f2654246" alt="Discovery process: Connect → Query Catalog → Compare State → Detect Changes → Store Results" className="hidden dark:block" width="1000" height="350" data-path="images/diagrams/discovery-process-flow-dark.svg" />
</Frame>

## Discovery Types

<Frame>
  <img src="https://mintcdn.com/anomalyarmor/mPQTTzz5PYy4fThA/images/diagrams/discovery-comparison-light.svg?fit=max&auto=format&n=mPQTTzz5PYy4fThA&q=85&s=c24683d227f243b87a4916cc2a4012e5" alt="Initial discovery (full scan) vs Incremental discovery (only changes)" className="block dark:hidden" width="900" height="400" data-path="images/diagrams/discovery-comparison-light.svg" />

  <img src="https://mintcdn.com/anomalyarmor/pPIiSU0b3Ixsp9az/images/diagrams/discovery-comparison-dark.svg?fit=max&auto=format&n=pPIiSU0b3Ixsp9az&q=85&s=217592d7dbfb0dc529c237526eb66bb6" alt="Initial discovery (full scan) vs Incremental discovery (only changes)" className="hidden dark:block" width="900" height="400" data-path="images/diagrams/discovery-comparison-dark.svg" />
</Frame>

**Initial Discovery** runs when you first connect a data source, performing a full catalog scan. **Incremental Discovery** runs on your configured schedule, checking only for changes since the last run.

## Common Questions

### What's the difference between initial and incremental discovery?

Initial discovery is a full catalog scan that runs once when you connect a database. Incremental discovery runs on your configured schedule (hourly, daily, or custom) and only records what changed since the last run - new assets, removed assets, schema diffs. Incremental is fast even on large databases because it queries the same metadata but diffs against the previous snapshot.

### Can discovery be triggered manually?

Yes. Click **Run Discovery** on the connection's detail page to kick off an on-demand scan. This is useful after a deliberate schema change (migration, table addition) when you want the catalog to reflect the new state immediately instead of waiting for the next scheduled run.

### Does discovery pull my actual data?

No. Discovery queries only system catalogs (`information_schema`, `pg_catalog`, or equivalent) to read names, types, and metadata. It never runs `SELECT *` or reads row values. The [Query Gateway](/security/query-gateway) enforces this.

### Why didn't a newly created table appear after I ran discovery?

Three common causes: (1) the table is in a schema excluded by your discovery include/exclude patterns; (2) your read-only database user doesn't have `USAGE` on that schema or doesn't see it in the system catalogs; (3) some databases delay catalog visibility for a few seconds after DDL. Check the connection's discovery include list first.

## Next Steps

<CardGroup cols={2}>
  <Card title="Configure Discovery" icon="gear" href="/schema-monitoring/asset-discovery">
    Set up schedules and discovery options
  </Card>

  <Card title="Connect a Data Source" icon="database" href="/data-sources/overview">
    Add databases for discovery to scan
  </Card>
</CardGroup>
