Hi, is there a way to give the connection string in a dynamic way?
for example, I tried creating a constant with the user attributes, but i cannot use this constant in the connection of the model
Hi, is there a way to give the connection string in a dynamic way?
for example, I tried creating a constant with the user attributes, but i cannot use this constant in the connection of the model
No not possible, you can either make the connection dynamic via a user attribute (in some attributes of the connection) or you can extend explores from new models that use other connections.
could you elaborate a bit on the second option?
i want to change the connection based on the instance im in. in each instance i have a user_attribute to check in which instance i am.
hi could you elaborate on the second solution?>
No not possible, you can either make the connection dynamic via a user attribute (in some attributes of the connection) or you can extend explores from new models that use other connections.
Hi,
The correct way to do what you want to do is to create a project per instance, import the LookML base project and override the constant that holds the connection string.
https://cloud.google.com/looker/docs/importing-projects
Hope this helps.
Hi,
The correct way to do what you want to do is to create a project per instance, import the LookML base project and override the constant that holds the connection string.
https://cloud.google.com/looker/docs/importing-projects
Hope this helps.
thanks for answering. the problem is a constant cannot be used for a connection string (when defining a model you write connection: "connection_name”. you cannot use a constant here
Hi,
The correct way to do what you want to do is to create a project per instance, import the LookML base project and override the constant that holds the connection string.
https://cloud.google.com/looker/docs/importing-projects
Hope this helps.
thanks for answering. the problem is a constant cannot be used for a connection string (when defining a model you write connection: "connection_name”. you cannot use a constant here
That’s is not correct. A constant can be used for a connection string. This works fine:
manifest.lkml
constant: db_connection { value: "paris_db"}
project.model
connection: "@{db_connection}"
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.