Field visibility in custom SQL

In data model, we have the possibility to change the visibility of each field like “every where”/“Only in detail views”/“Do not include”.
In my understanding, this feature can be use to hide sensible data to the end user and it works as expected in the sql builder.
But unfortunately, it doesn’t seems to be apply if we write a custom sql query. Something like “select * from mytablewithhidenfield” will return all field even those which should be hidden.

Is it expected?

Tested with 0.20.1 and 0.19.3 :slight_smile:

this issue is still exist, according to the desc, it is expected, but i think it should not be this way, hope this can be fixed


@williamherry There’s a request open for it, but it would require that Metabase interprets the SQL/Native query, which is something we’ve been looking at, but that’s a huge project. - upvote by clicking :+1: on the first post
The workaround is either not give query permissions to the users, or use a database view where the column is never returned to Metabase.

@flamber thanks for quick response