Now that we check the parameter values for their type we have a new issue:

  1. User has an existing dashboard with 13 parameters across 33 queries (some queries use all of them).
  2. Not all of the queries have the exact same definition for what might seem as the same parameter: even small changes like once it’s defined as a number and once as text. Another type of failure might be if a dropdown has different values across different queries on the same dashboard.

Right now running these queries fails due to a mismatch in parameter value, while before it was running just fine.

Aside from letting the user know is there something we can/should do?

Perhaps we should only apply safety and validation when a dashboard is turned public?

This crossed my mind, but –

  1. Complicated the codebase.
  2. Pushed the problem to when you might share this with others.

Maybe we need to somehow assess amount of dashboards having this problem? Also notify when creating a dashboard?

Hmmm, maybe it’s a case of the expected type being defined in the wrong spot, or perhaps it should allow for an override of the type in the query definition?

eg if query 1 has parameter “foo” as an integer, but query 2 has “foo” as text, maybe putting the type into the query definition would be the right place?