Ensure to use original query not persisted query when converting (#24580)
If you click "view sql" on a cached model you see the substituted query rather than the "real" query. The query based on cache: ```sql SELECT "source"."login" AS "login", "source"."count" AS "count" FROM (select "login", "count" from "metabase_cache_e449f_19"."model_4112_issue_assi") "source" LIMIT 1048575 ``` The real underlying query: ```sql SELECT "source"."login" AS "login", "source"."count" AS "count" FROM (SELECT "github_raw"."issue_events__issue__assignees"."login" AS "login", count(*) AS "count" FROM "github_raw"."issue_events__issue__assignees" GROUP BY "github_raw"."issue_events__issue__assignees"."login" ORDER BY "count" DESC, "github_raw"."issue_events__issue__assignees"."login" ASC) "source" LIMIT 1048575 ``` If you click the "convert to sql question" you will end up with a sql question that is not based on the original question but the Metabase managed table.
Please register or sign in to comment