User Guide Getting Started Help Center Documentation Community Training
New LookML
Old LookML
New LookML
Looker
  
English
Français
Deutsch
日本語
Working with Folders in the IDE

New in Looker 7.0, you can move and delete folders and project files in bulk.

All new LookML projects are enabled for IDE folders. If your Looker admin has enabled the IDE Folders Toggle legacy feature, you can choose the legacy behavior where the IDE has a flat file structure, without IDE folders. You can disable IDE folders in the Project Settings, as described on the Working with Folders in the IDE documentation page. However, in a future release the IDE Folders Toggle will be removed and all LookML projects will be enabled for IDE folders. See the Legacy Features End-of-life Schedule Community topic for details.

The Looker IDE supports folders for your project files. Folders are shown in the left navigation pane of the IDE.

Here is an example project where the folders Models and Views have been added by a developer:

You can create new folders or move items to a folder, as described below.

You can also click the Jump to file icon to search for a project file or click the Collapse all folders icon to minimize your project navigation tree to display only the top-level folders:

As you organize your LookML files with folders, you need to commit your changes and deploy them to production before other Looker developers can see them. This is just like any change you make to your LookML project.

How to Enable or Disable IDE Folders

Beginning in Looker 7.0, the option to enable or disable folders is available as a legacy feature. The ability to enable or disable folders will be deprecated in future versions, with all projects being enabled for IDE folders by default.

All new LookML projects are enabled for IDE folders. If your Looker admin has enabled the IDE Folders Toggle legacy feature, you can choose the legacy behavior where the IDE has a flat file structure, without IDE folders. However, in a future release the IDE Folders Toggle will be removed and all LookML projects will be enabled for IDE folders. See the Legacy Features End-of-life Schedule Community topic for details.

To enable or disable folders for a project:

  1. In the project, select Project Settings from the Git drop-down menu or from the More Options ellipsis menu.
  2. On the Project Settings page, select or deselect the Enable Folders checkbox.
  3. Click Save Project Settings.

Migrating an Existing Project to IDE Folders

All new LookML projects are enabled for IDE folders. If your Looker admin has enabled the IDE Folders Toggle legacy feature, existing projects may have the legacy behavior where the IDE has a flat file structure, without IDE folders. You can enable folders for these projects, as described in this section.

In a future release the IDE Folders Toggle will be removed and all LookML projects will be enabled for IDE folders automatically. See the Legacy Features End-of-life Schedule Community topic for details. We recommended that you migrate existing projects to IDE folders in preparation.

Before enabling folders for a project, note the following:

Once you enable folders for the project, none of your file paths or files are affected until you create folders and move items into folders.

When you change a file’s path, be sure to update any include and map_layer statements in your project to match the file’s new path. You may see LookML validation warnings on your old include statements if they no longer refer to existing files or file paths. In addition, you may see LookML validation errors for referenced objects that can no longer be found due to their files not being included. See the Using include with IDE Folders section of this page for information on using include with IDE folders, and the Using map_layer with IDE Folders section of this page for information on using map layers with IDE folders.

Handy Tip: You can use wildcards to create a temporary fix for LookML validation warnings and errors resulting from include statements. Using view files as an example, you can specify include: "/**/*.view" to include all files in all of your project folders. This will prevent the LookML validation problems while you continue developing. However, this is not a recommended solution for the long term, since including more files than are needed can affect performance.

Disabling Folders for a Project

If your Looker admin has enabled the IDE Folders Toggle legacy feature, you can choose the legacy behavior where the IDE has a flat file structure, without IDE folders. However, in a future release the IDE Folders Toggle will be removed and all LookML projects will be enabled for IDE folders. See the Legacy Features End-of-life Schedule Community topic for details.

But for now you can still disable IDE folders, and disabling it won’t break anything in your project:

With folders disabled, you can remove a file from its folder by using Rename to remove folders in the path name:

When you change a file’s path, be sure to update any include and map_layer statements in your project to match the file’s new path. You may see LookML validation warnings on your old include statements if they no longer refer to existing files or file paths. In addition, you may see LookML validation errors for referenced objects that can no longer be found due to their files not being included. See the Using include with IDE Folders section of this page for information on using include with IDE folders, and the Using map_layer with IDE Folders section of this page for information on using map layers with IDE folders.

Imported Projects Folder

New in Looker 7.0, files from imported projects files are displayed in the left navigation pane of the IDE for projects with IDE folders enabled.

For projects with IDE folders enabled, if you import a project, the Looker IDE automatically creates an imported_projects folder. Files from both local projects and remote projects are listed in the imported_projects folder. You can click on an imported project file to view its contents:

All imported project files are shown in light gray to indicate that they are read only. Since they cannot be edited, imported projects files are not visible when you are bulk-editing files in the IDE.

Creating a New Folder in the IDE

You can create folders for different file types (such as view files or model files). You can even create subfolders, which is very useful if you want to include a subset of your views.

To create a folder:

  1. Click + at the top of the project file list in the Looker IDE, then select Create Folder.
  2. Enter a name for the new folder.
  3. Click Create.

The new folder is added to the navigation pane.

Moving Items in a Foldered Project

You can drag and drop a single file or an entire folder with all its contents into new locations:

Drag and drop a file or a folder into another folder. The destination folder does not need to be expanded to receive other folders or files. A folder automatically expands when items are hovered over it.

Deleting a Folder

Deleting a folder also deletes its contents, which will affect any include statements that refer to the files in the folder. See the Using include with IDE Folders section of this page for information on using include with IDE folders.

Before deleting a folder, verify that you want to delete the files in the folder, or move the files to a different location before deleting the folder.

You can delete a folder by selecting Delete from the folder’s menu:

When you delete a folder, the IDE shows a confirmation pop-up. The pop-up specifies how many items are included in the deletion, which includes the folder and any files inside the folder:

Bulk Editing Files and Folders

You can also select multiple folders and files to move into new locations, or to delete.

Moving Files and Folders in Bulk

To move folders and files in bulk:

  1. Click the More Options ellipsis and select Bulk Edit from the drop-down menu.
  2. Select the items to move. The number of files selected is displayed in purple next to the SELECT FILES header.
    • To select or deselect individual files, expand their folders and click the checkbox next to file names.
    • To select or deselect entire folders and their contents, click the checkbox next to the folder name.
    • To select multiple items with one click, hold down the Shift key and click on the files and folders.
  3. Click the folder icon to select the Bulk Move Items option. The IDE will then display a folder selection pop-up menu:

  1. Choose a folder for the selected items, or click New Folder to create a new folder. The project name will display the file path of the folder you have selected at the top of the next menu page. To move items outside of folders, click Move without a folder selected.
  2. Confirm the selected destination by clicking Move, create a new folder within the selected folder by clicking New Folder, or return to the main folder options menu by clicking the project name link in the file path.

Deleting Files and Folders in Bulk

To delete folders and files in bulk:

Deleting a folder will delete all of its contents. Before deleting a folder, verify that you want to delete the files in the folder. If you want to keep them, move the files to a different location before deleting the folder.

  1. Click the More Options ellipsis and select Bulk Edit from the drop-down menu.
  2. Select the items to delete. The number of files selected is displayed in purple next to the SELECT FILES header.
    • To select or deselect individual files, expand their folders and click the checkbox next to file names.
    • To select or deselect entire folders and their contents, click the checkbox next to the folder name.
    • To select multiple items with one click, hold down the Shift key and click on the files and folders.
  3. Click the trash icon to select the Bulk Delete Items option. The IDE will then display a pop-up menu listing the items selected:

  1. Confirm the items to be deleted by clicking Yes, Delete, or return to item selection by clicking Cancel.

Using include with IDE Folders

Once you have organized your project files into folders, you need to provide the file’s path when using the include statement. You can use absolute or relative paths in the include statement (see the Path Syntax section of this page for examples), and you can use the wildcards * and ** to include multiple files at once (see the Wildcard Examples section of this page for examples).

For example, if you have this directory structure in your project:

The following statements will include the accidents view, the carriers view, and all views in the /Views/aircraft/ directory:

include: "/Views/accidents.view" include: "/Views/airlines/carriers.view" include: "/Views/aircraft/*.view"

When you change a file’s path, be sure to update any include statements in your project to match the file’s new path. You may see LookML validation warnings on your old include statements if they no longer refer to existing files or file paths. In addition, you may see LookML validation errors for referenced objects that can no longer be found due to their files not being included.

Handy Tip: When using wildcards, you can check which files are included by hovering over the information icon in the change bar of the file, or by clicking on the include statement and looking in the Quick Help:

Path Syntax

Here are some example syntaxes you can use for including files:

Syntax Description
PATH Relative path starting from current file’s location.
./PATH Relative path starting from current file’s location. This example points to the same file as the above example: PATH.
../PATH Relative path starting from current file’s parent directory.
/PATH Absolute path starting from current project’s root.
//PROJECT_NAME/PATH Absolute path starting from the root of an imported project called PROJECT_NAME.

Wildcard Examples

Here are some examples using wildcards (note that you can replace PATH with the path syntaxes in the previous table):

Syntax Description
PATH/*.view Wildcard matching files ending with .view at PATH.
PATH/*.view.lkml Wildcard matching files ending with .view.lkml at PATH.

Because view files have the extension .view.lkml, this example specifies the same file as the previous example, PATH/*.view. The .lkml part is not displayed in the IDE, nor is the .lkml part required for include statements. However, you can use wildcards to leverage this common part of the file extension. See the LookML Project Files documentation page for a list of project file extensions.
PATH/*.lkml Wildcard matching files ending with .lkml at PATH.

Note that several file types share .lkml as the final part of the file extension, such as .view.lkml and .model.lkml. The .lkml part is not displayed in the IDE, nor is the .lkml part required for include statements. However, you can use wildcards to leverage this common part of the file extension. See the LookML Project Files documentation page for a list of project file extensions.
PATH/myfile.* Wildcard matching files called myfile with any extension type at PATH.
PATH/myfile.*.lkml Wildcard matching files called myfile with any .lkml extension type at PATH.
PATH/my*file.view Wildcard matching files starting with my and ending with file.view at PATH.
PATH/my*fi*le.view Wildcards matching files starting with my, followed by some characters, then fi, some additional characters, and ending with le.view at PATH.
PATH/*/myfile.lkml Folder name wildcard. Matches all myfile.lkml files in any direct child directories of PATH.
PATH/**/my_file.view Recursive wildcard matching all files called my_file.view.lkml at PATH and all subdirectories.
PATH/**/*.view Recursive wildcard matching all files ending with .view.lkml at PATH’s subdirectories.
PATH/**/my_folder/myfile.view Recursive wildcard matching the subpath /my_folder/myfile.view at any depth under PATH.

Using map_layer with IDE Folders

If you have IDE folders enabled for your project, you need to use the file path when you specify a project file for map_layer:

map_layer: neighborhoods { file: "/maps/my_neighborhoods.json" }

Top