Skip to content

Field value dependency tracking + bulk replacement across saved content #81359

Description

@thackervishal

What problem will this feature request solve?
Analytics engineering teams often don't control their source systems but are responsible for the content their consumers use. When an upstream change replaces categorical values in a column (for example status = 'Open' becomes status = 'Working'), there's no native way to find everywhere that value is referenced or to update it in bulk.

Today Metabase tracks structural dependencies (tables, fields) but not the specific values used inside query logic. A re-scan of field values updates filter dropdown caches, but does nothing for values hardcoded into filters, custom expressions, segments, models/metrics, dashboard filter defaults, custom value lists, or native SQL. The only options are hand-editing every affected question or scripting against the API, both of which are error-prone and don't scale for instances with hundreds or thousands of questions.

There's no bulk find-and-replace for literal values, and there's no way to even see the blast radius before a value disappears after a sync, so reports break silently.

Describe the solution you'd like.
Extend the existing Dependency Graph / Replace Data Sources functionality to track and replace field values, not just structural references:

  • Find usages for a specific field + value (e.g. show everywhere status = 'Open' is referenced)
  • Impact analysis when a previously used field value disappears after a sync
  • Safe bulk replacement, e.g. status: Open -> Working, across saved content

Scope of coverage:

  • Structured content is precisely trackable, since it's stored as parsed MBQL: notebook filters, custom expressions, segments, models/metrics, dashboard filter defaults, custom filter value lists. Find-usages and safe replace are well-defined here.
  • Native SQL is best-effort only. A literal like 'Open' is just text in the query and is indistinguishable from the same string used anywhere else, so this surface needs a confidence/review step rather than a blind automatic replace.

So the feature would be exact for structured content and review-assisted for native SQL.

How does this feature request impact you?
Resolves significant, error-prone human (or AI-assisted) bulk find-and-replace work if the source system or an ERP decides to change long standing values for low-cardinality fields that are commonly used in query logic.

Saves immense engineering effort that likely will be duplicated by any customer in this situation.

Additional information
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions