## TL;DR
Compare the variable written in the SQL with the variable defined in the question settings, character for character. Native query parameters fail when the variable in the double brace placeholder was renamed in the text but not in the settings, when the variable type does not fit how it is used in the statement, or when a dashboard filter targets a variable the question no longer defines. Aligning name and type and saving the question restores the card.

```text
Metabase native query parameter failed: variable not found error in dashboard
```

## Use this when
- A native SQL card fails with a variable not found style error on a dashboard or in the editor.
- The SQL runs when pasted into another client with values filled in by hand.
- The question was recently pasted, imported, or edited outside the Metabase editor.

## Not for this skill when
- A GUI built question has a filter problem. Use the filter mapping guidance for notebook questions instead.
- The native query fails with a database syntax error even with parameters supplied. Debug the SQL itself first.

## Steps
1. Open the question in the native editor and list every variable placeholder in the SQL text. Verify: each placeholder name is written down exactly as it appears
2. Open the variables panel and compare its list with the placeholders, fixing any name that differs in spelling, case, or underscores. Verify: the panel lists exactly the variables used in the text, no more and no fewer
3. Check each variable type against its use in the statement, such as a field filter for a mapped column or a plain value for a literal comparison. Verify: every variable type matches how the SQL consumes it
4. Run the question in the editor supplying test values for all variables. Verify: the question returns rows with the test values applied
5. On the dashboard, reconnect the dashboard filter to the corrected variable and test with two different filter values. Verify: the card result changes correctly with the filter
6. Save the question and dashboard, then reload as a viewer and confirm the card renders on first load with defaults. Verify: the card shows data with the default parameter values

## Why it happens
Template variables are a small contract between the SQL text, the question settings and the dashboard filter. The editor keeps the contract visible, but pasted SQL bypasses the checks that maintain it. Reviewing the variables panel after any paste or import, and keeping variable names stable once dashboards depend on them, prevents the mismatch entirely.

Metabase native questions declare template variables that the editor lists beside the SQL. At run time Metabase substitutes values into those placeholders, and a dashboard filter can only drive a variable that exists with a compatible type, such as a date variable for a date filter or a field filter mapped to a real field. Edits made by pasting SQL from elsewhere often rename variables in the text only, which is exactly how the mismatch is created.

Field notes for Metabase specifically. The admin troubleshooting area, the task history, and the application database query tools give the evidence for most incidents, and the audit views on paid plans show who changed a question or a dashboard and when. Metabase behaviour differs meaningfully between the open source and paid builds, and between the application database choices underneath, so note the exact version when filing or searching for an issue. A question that works in the editor but fails on a dashboard is almost always a dashboard layer setting, which is why the two surfaces should always be tested separately.

For Metabase teams, models are the control point worth investing in. Questions built directly on raw tables inherit every schema change at full force, while models give the team one place to absorb a rename or a type change before it reaches fifty saved questions. Keeping production dashboards on models, and raw table questions in a clearly marked sandbox collection, measurably reduces breakage after warehouse changes. It also gives the schema sync somewhere forgiving to land, since the model owner sees the change before viewers do.
## Variants and edge cases
### Metabase variable not found native query parameter fix
The direct phrasing from the editor error.
### Metabase template tag renamed variable panel mismatch
The mismatch variant naming the variables panel.
### Metabase dashboard filter variable missing native card
The dashboard variant where the filter targets a missing variable.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_nIc_0HzbQzAX6Gbr0AJK0Q
