Knowledge Drop

BIGQUERY (HowTo): Can I parameterize a BigQuery connection with user attributes?

Userlevel 2

Last tested: Jan 21, 2019

We do not support parameterized connections with UA's in BQ, due to the necessity of a service account private key (which is a JSON file--so cannot be set to a UA). There is a feature request for this to be supported in BQ.

There is a workaround using model sets, however. In this set up, we'll create multiple connections (1 per BQ project) and within out LookML project, 1 model per connection. We will then define our explore in a view file, or a .explore.lkml file (as these do not require a defined connection).

Model file 1:

include: "bq_base_explores.view.lkml"connection: "bq-project-1"


Model file 2:

include: "bq_base_explores.view.lkml"connection: "bq-project-2"


View file/explore file (bq_base_explores.view.lkml) :

explore: abcexplore: xyz


We will then define 2 model sets, one with permissions to model 1 and one for model 2, and assign these to users who would fall into our different UA groups. Our explores will be available to both sets of users, but will be queried against different connections depending on the user.


This content is subject to limited support.                



0 replies

Be the first to reply!