How to hide a column based on access_filter

how to hide a column based on access_filter.

Assume we have a multi-tenant look and we are using the unit id for multiple clients to restrict them to access their data.

access_filter: {
field: table.unitid
user_attribute: unitid
}

Example:

unitId = 1 --> company 1 user login
unitId = 2 --> company 2 user login
unitId = 3 --> company 3 user login
.
.
.
so on

 

assume we have 10 columns in a look.
we have an additional request to add the 11th column but we want to show the 11th column only for "unitid:1 --> company 1" and hide the 11th column for others.

1 possible solution is to have two looks with column differences for specific company1 but this would be an extra headache to maintain two reports for future changes.

Please let us know how it could be possible, in LookML to hide a column based on access_filter.

Solved Solved
0 2 603
1 ACCEPTED SOLUTION

2 REPLIES 2

I don't think it's possible to do that at the column level. Only at the row level.

I got the solution at the column level. Just I need to test it.

https://cloud.google.com/looker/docs/reference/param-model-access-grant

Top Labels in this Space