Any way to list all models/views that reference a connection? We have many projects and manually opening/searching each one would be a drag.
I think there are a couple of ways you can do this.
Admin users have access to i__looker which can be used query data on your instance. Replacing your instance URL in this link will show a count of queries run on each model, pivoted by connection. Adding a filter on the connection field would allow you to search for a particular connection.
https://your.looker.com/explore/i__looker/history?fields=history.connection_name,query.model,history.query_run_count&pivots=history.connection_name&sorts=history.connection_name,query.model&limit=500&column_limit=50&query_timezone=America%2FLos_Angeles&vis=%7B%7D&filter_config=%7B%7D&origin=share-expanded
The caveat here is that the History explore in i__looker shows query data that is limited to either 90 days back, or 100,000 rows, whichever is first so if users haven’t been querying a model, it will not return in these results.
Other than that, since the ‘Find and Replace’ option within Looker searches one project at a time, the solution would be to search the git repository for occurrences of connection: "connection_name"
Thanks, the i__looker query was perfect!
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.