Skip to main content

Syncing and scanning databases

Metabase periodically runs different types of queries against your database to stay up to date with your schema and data. These automated processes help Metabase provide better suggestions, populate filter dropdowns, and automatically choose appropriate visualizations.

Overview of sync processes

Metabase performs three types of operations to understand your data:

Sync

Updates database schema, table structures, and field information

Scan

Samples column values for filter dropdowns and data type detection

Fingerprint

Computes statistics to improve visualizations and suggestions
Metabase doesn’t store complete tables from your database—only metadata, sample values, and statistics to improve the user experience.

Initial sync, scan, and fingerprinting

When you first connect a database to Metabase, it performs an initial sync to:
  1. Discover all tables and views in your database
  2. Identify columns and their data types
  3. Detect relationships (foreign keys)
  4. Automatically assign semantic types
  5. Sample field values for filters
  6. Compute statistics for better visualizations

Monitoring sync progress

You can track the progress of these operations:
  1. Click the grid icon in the top right
  2. Go to Admin > Tools > Tasks
  3. Filter by sync-related tasks
Sync collects:
  • Table and view names
  • Column names and data types
  • Primary and foreign key relationships
Scan samples:
  • First 1,000 distinct values per column (for filters)
  • Up to 100 KB of text per column
Fingerprinting analyzes:
  • First 10,000 rows of each table
  • Computes min/max, averages, null ratios
  • Detects special types (URLs, emails, geographic data)

Viewing and editing synced metadata

Once the initial sync completes, you can view and customize the metadata:
  1. Go to Admin > Table Metadata
  2. Select your database and table
  3. Edit field types, visibility, and other settings
For more information, see Editing metadata.

How database syncs work

A sync is a lightweight query that updates Metabase’s understanding of your database schema.

Data collected during sync

What collectedWhy it’s needed
Table namesDisplay tables in query builder
Field namesShow available columns
Field data typesProper querying and type handling
Primary keysEnable detailed views and table display
Foreign keysAuto-join tables and visualize relationships

How database scans work

A scan is a more intensive query that samples column values to populate filter dropdowns and improve the user experience.

Data collected during scan

What collectedWhy it’s needed
Distinct category valuesPopulate filter dropdown menus
Active field valuesImprove filter UI performance
Advanced field valuesSupport row and column security
Scans only include “active fields”—fields used within the past 14 days. Inactive fields become active again when someone uses them.

How database fingerprinting works

Metabase fingerprints your data by sampling rows and computing statistics to provide better suggestions and visualizations.

Data collected during fingerprinting

What collectedWhy it’s needed
Distinct value countDetermine field caching strategy
Min/max numeric valuesEnable binning and range filters
Date rangesSet date filter defaults
Special type detectionIdentify URLs, emails, geographic data
Null value ratioAssess data quality
Average/median valuesSet visualization defaults
Text length metricsHide overly long text fields

Choose when syncs and scans happen

By default, Metabase performs:
  • Hourly syncs: Lightweight schema updates
  • Daily scans: Intensive field value sampling
For large databases, you may want to control when these operations occur.

Configuring sync and scan schedules

  1. Click the grid icon in the top right
  2. Go to Admin > Databases
  3. Select your database
  4. Click Edit connection details in the “Connection and sync” section
  5. Expand Show advanced options
  6. Toggle Choose when syncs and scans happen

Sync schedule options

Configure when schema syncs occur:
  • Frequency: Hourly (default) or daily
  • Time: Specific time to run (in server timezone)
The time is based on the timezone where your Metabase server is running.

Manual sync and scan operations

Manually syncing tables and columns

To immediately update your database schema:
  1. Go to Admin > Databases
  2. Select your database
  3. Click Sync database schema now
This is useful after making schema changes to your database, like adding new tables or columns.

Manually scanning column values

To scan all columns in a table:
  1. Go to Admin > Table Metadata
  2. Select your database and table
  3. Click the gear icon at the top of the page
  4. Click Re-scan this table

Clearing cached values

To clear all cached field values for a table:
  1. Go to Admin > Table Metadata
  2. Select your database and table
  3. Click the gear icon in the upper right
  4. Click Discard cached field values

Periodically refingerprint tables

Enabling periodic refingerprinting will increase the load on your database, as Metabase will sample 10,000 rows from each table during every sync.
By default, Metabase only fingerprints your data once during initial setup. If your data patterns change significantly over time, you may want to enable periodic refingerprinting:
  1. Go to Admin > Databases
  2. Select your database
  3. Click Edit connection details
  4. Expand Show advanced options
  5. Turn on Periodically refingerprint tables
This will run fingerprinting queries during each sync to keep statistics current.

Disabling syncing and scanning for specific tables

To prevent Metabase from syncing and scanning a specific table, hide it:
  1. Go to Admin > Table Metadata
  2. Select your database
  3. Hover over the table name in the sidebar
  4. Click the eye icon to hide the table
Hidden tables won’t appear in the query builder or data reference. However, users can still query hidden tables using the SQL editor.

Syncing and scanning using the API

You can trigger syncs and scans programmatically using the Metabase API.

Sync or scan with user authentication

These endpoints require authentication with a user ID and session token:
# Sync database schema
POST /api/database/{id}/sync_schema

# Re-scan field values
POST /api/database/{id}/rescan_values

Example: Sync after ETL job

You can call the sync API at the end of your ETL pipeline to ensure Metabase has the latest schema:
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: ${MB_API_KEY}" \
  https://your-metabase.com/api/notify/db/1
For complete API documentation, see API reference.

Understanding sync, scan, and fingerprint impact

Impact on your database

OperationFrequencyLoadDuration
SyncHourly (default)MinimalSeconds
ScanDaily (default)ModerateMinutes
FingerprintOnce (default)HigherMinutes to hours
Actual impact depends on your database size, number of tables, and database performance.

Troubleshooting sync and scan issues

Possible causes:
  • Initial sync hasn’t completed
  • Tables are hidden
  • Database user lacks permissions
  • Schema not included in sync settings
Solutions:
  1. Wait for initial sync to complete
  2. Check table visibility in Table Metadata
  3. Verify database user has SELECT privileges
  4. Check schema inclusion in database settings
  5. Manually trigger a sync
See: Can’t see tables
Possible causes:
  • Field hasn’t been scanned yet
  • Cache is outdated
  • Field hasn’t been used in 14+ days (inactive)
  • Scan is disabled
Solutions:
  1. Manually re-scan the field
  2. Clear and refresh the field cache
  3. Use the field in a question to make it active
  4. Enable scheduled scans
Possible causes:
  • Cached values are stale
  • Sync hasn’t run since schema changes
  • Query results are cached
Solutions:
  1. Manually sync the database
  2. Clear cached field values
  3. Refresh the question (not just cached results)
  4. Check sync schedule and adjust if needed
See: Data doesn’t match database
Possible causes:
  • Database connection issues
  • Insufficient database permissions
  • Database server timeout
  • Large tables causing timeouts
Solutions:
  1. Check database connection status
  2. Verify database user permissions
  3. Review database server logs
  4. Hide very large tables that aren’t needed
  5. Increase database timeout settings if needed

Further reading

Can't see tables

Troubleshoot missing tables and columns

Sync troubleshooting

Fix sync and fingerprinting issues

Metadata editing

Customize table and field metadata

Semantic types

Understand how Metabase categorizes fields

Build docs developers (and LLMs) love