How do I count the number of models or views in a project?

Knowledge Drop

Last tested: Nov 14, 2017
 

Open the JavaScript console on a project's page, with "Cmd + Option + I" (for Mac) or "Ctrl + Shift + I" (for PC) and navigate to the "console" tab. Then, paste in one of the following commands:

Count the number of models:

$("#project-sidebar .model-link[href$='model.lkml']")


Count the number of views:

$("#project-sidebar .model-link[href$='view.lkml']")

The output will be a number in parens followed by an array of files, the number is the count of the model or view files.

This content is subject to limited support.                

Version history
Last update:
‎06-14-2021 06:17 PM
Updated by: