Question

LookML Dynamic query in .model

  • 29 December 2020
  • 1 reply
  • 60 views

Hi,

I is there a way to toggle between two connections based on my user attributes 
eg: uat and production. 


eg if user attribute is yes then uat else prod

Is it possible to get something like: 

In the x.model file:

connection:
{
  sql: {% user_attributes['conn] }}' = 'yes' %}
             ${"uat"}
          {%else%} ${"prod"}
       {% endif%};;
}


1 reply

Userlevel 6

You can do this in the connection settings, set the schema for example based on a user att value.

Reply