Metabase fires two queries for field filters when clicked from one dashboard to another

I have created a dashboard that has a question written using notebook editor. On clicking the id field it goes to another dashboard that has field filter to which the value is passed from previous dashboard.

Looking at the network console metabase fires two queries for the same data one of which sometimes goes to canceled state or both queries complete successfully. I use bigquery, and this cancel is not propagated to the database, so every query runs twice and incurs additional cost for us. I am on enterprise version of metabase 1.39.2.

Is this expected or am I overlooking something? I was able to replicate the same behaviour using sample dataset that uses H2 database.

Step 1: Create a dashboard with using notebook editor on Orders table.
Step 2: Created a question using sql: select * from products where {{product_id}} product_id is the field filter.
Step 3: Add this query to products dashboard having a product_id filter at dashboard level and link it to the id field in the question.
Step 4: From the dashboard on orders table, change the product_id click behaviour to go to products dashboard passing the product_id value.
Step 5: On the chrome inspect on network tab I see two queries running having the url to the same card api with same parameters.
metabase_query_issue

  • Saurabh

Hi @saurabh0908
You're seeing this issue:
https://github.com/metabase/metabase/issues/13150 - upvote by clicking :+1: on the first post