On this Page
Docs Menu

Go to Model Parameter List


- connection: connection_name
the name of a connection


connection specifies the database connection from which a model will retrieve data. Database connections are defined and named in Looker’s Admin settings. A model may only use one connection.


Retrieve data from the mysql_db connection for the model being used:

- connection: mysql_db

Common Challenges

connection Must Reference A Connection Name From Looker’s Admin Settings

The connection name that is referenced by connection does not take the name of an actual database or schema. The name must be one of the connections available when configuring a model in Looker’s Admin settings.

If a Model Configuration Exists Then connection Can Only Reference an Allowed Connection

If a developer specifies a connection in the model file that is not allowed in the model configuration, then any query on that model will not run.

If a Model Configuration Does Not Exist Then Only Certain People Can Query

If you have not been given the manage_models permission (which is included in the admin role) then the model must be configured before you can run queries on the model.

Still have questions?
Go to Discourse - or - Email Support