Implicitly detect schema name in native query

It would be great if the metabase intellisense feature in the native query tool could implicitly detect the schema the table is in. Currently, everything defaults to dbo.[tablename] and the user must explicitly enter the schema prefix.

This table is actually in a schema called [dom]
image

Selecting the table from the intellisense recommendation returns the following. This will generate an error on execution.
image

The desired outcome from metabase is the following:
image

Hi @preston
It would require that Metabase could parse the SQL, or a different editor than Ace currently used.
You're likely interested in these - upvote by clicking :+1: on the first post of each issue:
https://github.com/metabase/metabase/issues/11327
https://github.com/metabase/metabase/issues/12520
https://github.com/metabase/metabase/issues/3885

1 Like

Thanks @flamber!