Dynamic Connections for Models

dkline
New Member

Is there a way to dynamically change a connection in a model so that we can take advantage of Snowflake secure views. Basically, in our Snowflake instance we will have secure views for each customer’s data and depending on the Looker user or group we want to use a different connection into the warehouse so that we can restrict access at the warehouse level. I know that I can only use one connection in a model and I can duplicate the models for each customer and have different connections; however, that will quickly become a maintenance nightmare. I would prefer to dynamically switch the connection so that the data reflects the correct secure view.

1 4 2,973
4 REPLIES 4

Hi @dkline,

There is a way to parameterize connections using user attributes. In the connection settings, if you click on the person icon on the right hand side of the text box for the connection name you can set the connection name dynamically based on that user attribute. The other settings can be dynamically set based on user attributes.

Here you have further info about it.

Thanks!

hi diego, is there any change because this is not possible with bigquery.

pmalon
New Member

I wonder why it is not possible to parameterise connections when using SSL tunnel? 

@diego_campos1 

 https://cloud.google.com/looker/docs/admin-panel-users-user-attributes#connections

User attributes in connection parameter works fine for most DBs but not for GCP BIGQUERY, because it requires credentials file below which cannot be dynamically passed based on user attribute. This is causing a lot of complexities in switching between environments..

Service Account JSON/P12 File

​​​​​​​

Top Labels in this Space
Top Solution Authors